-
-
Notifications
You must be signed in to change notification settings - Fork 3
Building wxSA on Windows
There is an MS Makefile (for use with NMAKE and Visual Studio) called Makefile.vc
. It is intended to be very similar to the Unix Makefile, so that the two can be kept in sync.
It can be run using nmake -f Makefile.vc
, although the expectation is that it will be used as part of an “external build” project with Visual Studio. Instructions for setting this up are given below.
The makefile makes use of the wx recommendation to have an environment variable called WXWIN that contains the path of the directory where wx is downloaded and built. This enables the makefile to be independent of the specific location of wx. SA also uses a library called libsndfile, and this should get similar treatment (ie a variable called SNDFILE that is used in the makefile).
Eventually, it would best to create a Bakefile-based build system, but this will take time to develop.
These are the steps needed to set up and build SA on Windows:
- Check out
http://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_8_7
toC:\wx
- Copy
include\wx\msw\setup0.h
toinclude\wx\msw\setup.h
- Edit
build\msw\config.vc
and set:- BUILD = debug
- SHARED = 1
- UNICODE = 1
- In a command prompt:
- vcvars32
- cd build\msw
- nmake -f makefile.vc >make.out 2>&1
- Add
WXWIN=
... to the environment
Note: This uses svn and make, but using a zip/setup.exe and a VS project build also works. The two are fully compatible, and it is possible to build the samples using their VS project file after building the main libs with nmake.
- Unzip to C:\
- In a command prompt:
- cd \libsndfile-1_0_17
- vcvars32
- lib /machine:i386 /def:libsndfile-1.def
- Add
SNDFILE=
... to the environment
- New -> Project From Existing Code...
- Project file location:
- Src\SaExe
- Project name:
- SpeechAnalyzer
- Use external build system:
- nmake -f Makefile.vc8 all
- nmake -f Makefile.vc8 clean all
- nmake -f Makefile.vc8 clean
- build\SAminimal.exe
- WIN32 _WINDOWS NOPCH _VC80_UPGRADE=0x0600 _DEBUG _UNICODE UNICODE WXUSINGDLL
- \src\wxWindows\lib\vc_dll\mswud \src\wxWindows\include
- _Prefix\SAprefix.h
- Project file location: