Page 1 of 2
Problems with VC.NET
Posted: Wed Apr 23, 2003 2:35 am
by wassup
I have tried to build Detours under VC.net, but when I try to execute the vcvars32.bat file and then go to detours and use nmake, the nmake command is not recognized.
Any tips?
Posted: Wed Apr 23, 2003 8:37 am
by Mckorr
Had the same problem. It's all a matter of how you structure your command line.
I build Detours from C:\temp. So I need to execute nmake from C:\temp\src to compile it. The command line would be:
C:\temp\src>"c:\program files\visual studio .net\vc7\bin\nmake.exe"
Just find the full windows path name to nmake, and make sure you put the whole thing in quotation marks so it recognizes the long directory names.
I should qualify that: I'm using WinXP Pro. I'd think it would be the same on 98/Me.
Posted: Wed Apr 23, 2003 9:59 am
by wassup
Thanks for the help McKorr, but when I try what you suggested I get the following:
if not exist "..\include" mkdir "..\include"
if not exist "..\lib" mkdir "..\lib"
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
I also use WinXP Pro.
Any other ideas?
Posted: Wed Apr 23, 2003 11:05 am
by JohnDoe
before you run the nmake run vcvars32.bat from the bin directory from where ever you installed visual studio.
Posted: Wed Apr 23, 2003 1:04 pm
by wassup
JohnDoe wrote:before you run the nmake run vcvars32.bat from the bin directory from where ever you installed visual studio.
I did and get the error above, which is why I asked.
Posted: Wed Apr 23, 2003 1:49 pm
by JohnDoe
Did you run nmake in the same command window that you ran vcvars32.bat ?
Did this time, got further but still errors
Posted: Wed Apr 23, 2003 2:49 pm
by wassup
Did it in the same command line window but still have errors:
E:\VSNet\Vc7\bin>vcvars32.bat
E:\VSNet\Vc7\bin>"E:\Programming\VSNet\Common7\Tools\vsvars32.bat"
Setting environment for using Microsoft Visual Studio .NET 2003 tools.
(If you have another version of Visual Studio or Visual C++ installed and wish
to use its tools from the command line, run vcvars32.bat for that version.)
E:\VSNet\Vc7\bin>f:
F:\>cd Detours
F:\Detours>nmake
Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
cd "F:\Detours\src"
if not exist "..\include" mkdir "..\include"
if not exist "..\lib" mkdir "..\lib"
detours.cpp
disasm.cpp
image.cpp
firstexc.cpp
f:\detours\src\firstexc.cpp(61) : error C2220: warning treated as error - no 'object' file generated
f:\detours\src\firstexc.cpp(61) : warning C4733: Inline asm assigning to 'FS:0'
: handler not registered as safe handler
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'E:\VSNet\VC7\BIN\nmake.exe' : return code '0x2'
Stop.
F:\Detours>
Posted: Wed Apr 23, 2003 4:20 pm
by dont_know_at_all
repopulate you detours files -- it seems like they are corrupted
Posted: Wed Apr 23, 2003 7:52 pm
by Mckorr
Might be more simple than that.
vcvars.bat alters the path environment variable. Run vcvars, then REBOOT. Path changes won't take effect till then.
Posted: Wed Apr 23, 2003 7:57 pm
by eqjoe
If you install .NET on XP... check the .NET program directory for a ".NET Shell Shortcut". One was installed on my new XP system when I installed .NET and it can be found in start->MS.NET->MS.NET Tools->MS.NET Shell
Posted: Thu Apr 24, 2003 4:48 am
by wassup
eqjoe wrote:If you install .NET on XP... check the .NET program directory for a ".NET Shell Shortcut". One was installed on my new XP system when I installed .NET and it can be found in start->MS.NET->MS.NET Tools->MS.NET Shell
Thanks for the help. I tried this and am getting the exact same error as above.
*** Edit ***
Well, after looking closer I see a difference from the previous errors. Any idea what this one may be from?
F:\>cd detours
F:\Detours>nmake
Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
cd "F:\Detours\src"
if not exist "..\include" mkdir "..\include"
if not exist "..\lib" mkdir "..\lib"
detours.cpp
disasm.cpp
image.cpp
firstexc.cpp
f:\detours\src\firstexc.cpp(61) : error C2220: warning treated as error - no 'object' file generated
f:\detours\src\firstexc.cpp(61) : warning C4733: Inline asm assigning to 'FS:0': handler not registered as safe handler
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'E:\VSNet\VC7\BIN\nmake.exe' : return code '0x2'
Stop.
Posted: Sat Apr 26, 2003 1:04 pm
by Jaerin
I just reinstalled my machine and installed Visual Studio.Net Architect. I also am getting this issue when trying to build detours.
Jaerin
Posted: Sat Apr 26, 2003 1:23 pm
by Mckorr
Don't build from the detours directory, build from detours\src.
Posted: Sat Apr 26, 2003 1:30 pm
by Jaerin
Actually I figured it out. Edit the Makefile in the src dir and take out the /WX in the following line:
CFLAGS=/nologo /DDEBUG /DWIN32_LEAN_AND_MEAN /WX /W4 /Zi /FR "/Fd$(LIBD)\detours.pdb" \
/MTd /Gy /Gs /Gi- /Gm- /Zl /O -D_WIN32_WINNT=0x403
That makes the 1 warning you get from the firstexc.cpp file into a fatal error.
Jaerin
Posted: Sat Apr 26, 2003 4:06 pm
by wassup
Thanks Jaerin
I still get an error much later in the process, but the detours.lib and detours.pdb get created at least.
Much appreciated.