A forum for feature requests/discussions and user submitted patches that improve MQ2
Moderator: MacroQuest Developers
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Wed Apr 23, 2003 2:35 am
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?
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Wed Apr 23, 2003 8:37 am
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.
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Wed Apr 23, 2003 9:59 am
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?
-
JohnDoe
- decaying skeleton

- Posts: 4
- Joined: Fri Mar 28, 2003 2:59 pm
Post
by JohnDoe » Wed Apr 23, 2003 11:05 am
before you run the nmake run vcvars32.bat from the bin directory from where ever you installed visual studio.
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Wed Apr 23, 2003 1:04 pm
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.
-
JohnDoe
- decaying skeleton

- Posts: 4
- Joined: Fri Mar 28, 2003 2:59 pm
Post
by JohnDoe » Wed Apr 23, 2003 1:49 pm
Did you run nmake in the same command window that you ran vcvars32.bat ?
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Wed Apr 23, 2003 2:49 pm
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>
-
dont_know_at_all
- Developer

- Posts: 5450
- Joined: Sun Dec 01, 2002 4:15 am
- Location: Florida, USA
-
Contact:
Post
by dont_know_at_all » Wed Apr 23, 2003 4:20 pm
repopulate you detours files -- it seems like they are corrupted
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Wed Apr 23, 2003 7:52 pm
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.
-
eqjoe
- a grimling bloodguard

- Posts: 984
- Joined: Sat Sep 28, 2002 12:26 pm
Post
by eqjoe » Wed Apr 23, 2003 7:57 pm
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
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Thu Apr 24, 2003 4:48 am
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.
-
Jaerin
- Developer

- Posts: 133
- Joined: Mon Mar 10, 2003 7:37 pm
-
Contact:
Post
by Jaerin » Sat Apr 26, 2003 1:04 pm
I just reinstalled my machine and installed Visual Studio.Net Architect. I also am getting this issue when trying to build detours.
Jaerin
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Sat Apr 26, 2003 1:23 pm
Don't build from the detours directory, build from detours\src.
-
Jaerin
- Developer

- Posts: 133
- Joined: Mon Mar 10, 2003 7:37 pm
-
Contact:
Post
by Jaerin » Sat Apr 26, 2003 1:30 pm
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
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Sat Apr 26, 2003 4:06 pm
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.