Onega

a lot of VC++ posts, a few C# posts, and some miscellaneous stuff

Monday, September 19, 2005

build gnumake on windows with VC++6.0

Open CMD window and run the following commands
C:\Temp\make-3.80>"C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"
C:\Temp\make-3.80>C:\Temp\make-3.80\build_w32.bat>build.log
I got the following error:
variable.obj : error LNK2001: unresolved external symbol _hash_init
...
There is a hint from JG that it is a bug of gnumake3.80
http://lists.gnu.org/archive/html/make-w32/2005-07/msg00082.html
So I modify build_w32.bat to add the following lines:

...
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c hash.c
echo WinRel\hash.obj >>link.rel
...
.\WinRel/hash.obj

Now I am able to see the beautiful message: "WinRel build succeeded!"

0 Comments:

Post a Comment

<< Home