Compiling Using MSVC On The Commandline
From WxWiki
[edit] Compiling using MS Visual C++ 6.0 on the command-line
The main instructions for building from the command-line are in "WXDIR\docs\msw\install.txt" and "WXDIR\BuildCVS.txt". Please check those docs for more complete information. Here is a quick summary.
Open a command prompt and prepare the appropriate environment variables:
- C:\PROGRA~1\MICROS~1\VC98\BIN\VCVARS32.BAT
- set WXWIN="path to your wxWidgets sources" (e.g. set WXWIN="c:\wxWidgets")
- (if you are using the VC IDE under XP goto System > Advanced > Environment Variables; and define a new value called WXWIN, you must restart VC for changes to take effect)
If you have source from CVS:
- copy %WXWIN%\include\wx\msw\setup0.h %WXWIN%\include\wx\msw\setup.h
If you have sources from a release package, setup.h will already be there. The setup.h defaults should be fine for most circumstances. The most likely reason to edit setup.h would be to enable Unicode support. You can do that by setting wxUSE_UNICODE to 1, then see the notes below about compiling for Unicode.
- cd %WXWIN%\build\msw
Debug build (the default):
- nmake -f makefile.vc
Release build:
- nmake -f makefile.vc FINAL=1
Debug Unicode build (after having modified setup.h as described above):
- nmake -f makefile.vc UNICODE=1
Release Unicode build (after having modified setup.h as described above):
- nmake -f makefile.vc FINAL=1 UNICODE=1
[edit] note
The installation docs talk about running a 'cleanall' make target between different configurations. I haven't found this to be necessary when building the above set of libs. If you do run 'cleanall', be aware that it will remove all the libraries you have previously built, so if you want to save them, you should move them to a different location first. If you just want to remove stale object files, the 'clean' target is probably sufficient.
[edit] getting nmake
This is not Lucent/AT&T's nmake.
http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/nmake15.exe
