INSTRUCTIONS FOR COMPILING ON MS WINDOWS
This guide details how to setup a build environment using the Microsoft Free Tools and wxWidgets for Windows. Other build environments will require slightly different setups, but most of the details should be fairly easy to adjust to your own environment.
Setting up the build environment
Download the following software (free)
(Each link takes you to the corresponding download page.)
- Microsoft Visual C++ 2008 Express Edition (MSVC)
- Microsoft Windows SDK v6 (installed automatically with MSVC)
- wxWidgets >= 2.8.7
The total size of the required installations sources is > 500 MB.
Install the downloaded software
- Install MSVC.
- Install wxWidgets.
The rest of the documentation assumes that you installed everything into the default locations. So you may need to alter paths etc.
Compiling wxWidgets
- Navigate to C:\wxWidgets-2.8.7\build\msw and open wx.dsw.
- When prompted to open and convert the files, click yes to all.
- Change the build type to "Unicode Release", by default this is set to "Debug". This can be altered by selecting the option from the drop-down list between the compile button (green arrow) and the platform type (which should say "Win32").
- In the Solution explorer select all the wx subprojects. There are 20 of them.
- Right click on the selected projects and select Properties.
- On the Properties dialog go to Configuration Properties -> C/C++ -> Code Generation.
- Change the value of Runtime Library to "Multi-threaded (/MT)".
- Close the Properties dialog with OK.
- Go to the Build menu and hit Build solution.
- Make a snack, this will take a while.
- When the compiling has finished, you should see a line that reads "Build: 20 succeeded, 0 failed, 0 up-to-date, 0 skipped".
Note: If you need to make any changes to wxWidgets, just open wx.sln (not wx.dsw) and recompile.
Configuring MSVC (additional paths to wxWidgets)
- Open MSVC and click Tools -> Options.
- Goto Projects and Solutions -> VCC++ Directories.
- Change Show directories for to "Include files"
- Add the following directories to the list:
- C:\wxWidgets-2.8.7\include
- C:\wxWidgets-2.8.7\include\msvc
- Change Show directories for to "Library files"
- Add the following directory to the list:
- C:\wxWidgets-2.8.7\lib\vc_lib
- Close the Options dialog with OK.
You have now successfully set up your FahMon build environment!
Compiling FahMon
Once the build environment and wxWidgets are set up, these are the only steps you need to take to (re)compile FahMon:
- Open fahmon.sln.
- Change the build type to "Release".
- Go to the Build menu and hit Build solution.
- When the compiling has finished, you should see a line that reads "Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped".
If this is the case, FahMon has compiled successfully and you can find your new fahmon.exe inside the Release folder.
