How to compile FlightGear with Microsoft Visual C/C++ - February 2005 ===================================================================== FlightGear ships with MSVC project files in MSVC6 DSW/DSP format. These should load in either MSVC6 or MSVC7. Of course, MSVC7 will 'convert' the project to its own SLN/VCPROJ files. The main DSW/DSP files are 'partially' maintained by a perl script, that processes the makefile.am 'tree' and writes an 'updated' build file, after applying am2dsp.cfg ... but this is sometimes 'incomplete' ... Typically, at a minimum, you have to 'fix' the 'Additional Include Directories:' to suit your particular 'environment' ... You will need add fix a path to SimGear, zlib, PLIB, and OpenAL, ... note MSVC6 separates the paths with a comma, while MSVC7 uses a semi-colon. It is also important to check the 'Runtime' setting for both Debug and Release configurations ... You may choose whatever you desire, but you MUST use the same 'runtime' for each of the dependant static libraries ... I choose 'Multi-theaded' throughout ... that is 'Muti-threaded Debug (/MTd)' for Debug, and 'Multi-threaded (/MT)' for release configuration. After I get the 'include directories' correct ... all headers are found ... and the 'Additional Dependencies' (libraries) added ... and their respective 'Additional Library Directories' added ... I am justly rewarded with something like - FlightGear - 0 error(s), 163 warning(s) ---------------------- Done ---------------------- Rebuild All: 2 succeeded, 0 failed, 0 skipped I 'tend' to ignore the 'warnings' ;=(( FlightGear is READY-TO-ROLL - Add a command line to the source data, like --fg-root=\FlightGear\data - and you should be FLYING ;=)) Given that I use the following directory structure - FlightGear\source SimGear\source (and zlib) PLIB AL\OpenAL Here is my 'All configurations' 'Additional Include Directories' string - ..\..;.\src;.\src\include;..\..\SimGear\source;..\..\SimGear\source\src-libs\zlib-1.1.4;..\..\AL\openal\include Here is my Release 'Additional Dependencies' - ws2_32.lib SimGear.lib fnt.lib sg.lib ul.lib net.lib ssg.lib pui.lib js.lib ALut.lib zlib.lib openal32.lib Here is my Release 'Additional Library Directories:' ..\..\SimGear\source\Release;..\..\PLIB;..\..\SimGear\source\src-libs\zlib-1.1.4\Release;..\..\al\openal\win\ALUT\Release;..\..\al\openal\win\Router\Release Here is my Debug 'Additional Dependencies' - ws2_32.lib SimGear.lib fnt_d.lib sg_d.lib ul_d.lib net_d.lib ssg_d.lib pui_d.lib js_d.lib ALut.lib zlib.lib openal32.lib Here is my Debug 'Additional Library Directories:' ..\..\SimGear\source\Debug;..\..\PLIB;..\..\SimGear\source\src-libs\zlib-1.1.4\Debug;..\..\al\openal\win\ALUT\Debug;..\..\al\openal\win\Router\Debug As can sometimes happen, especially if you are using cvs (or WinCVS) to download, update the source, you may have add (or subtract) a source file, or 2. On a recent cvs update (9 Feb 2005) I had to add 'fgmetar.cxx' to the build, but this may be updated by the time you read this, but there may be others ... it is a dynamic source ... After trying the default Cessna, I usually add --aircraft=ufo and --fdm=ufo to the command line ... pull back on the stick, and hit the trottle ... the ufo can climb vertically at nearly 4,000 knots! ... swoop below Golden Gate ... even 'below' the 'surface', and see the 'trees' up in the sky ... Happy flying ;=))