internal: preamble build downloads ... end
2011-05-09: A relative minor, but quite important update. The previous build of the separate SimGear libraries was using the MS DLL libraries, that is /MD and /MDd. This build is using ONLY the static MS runtime, /MT and /MTd. This coincided with building OSG, PLIB, zlib, etc - that is all the dependencies using the SAME runtime. Failure to ENSURE the SAME runtime is used leads to multiple LINK problems.
2010-12-10: A few times, over the years, I have regretted that SimGear is normally compiled as one big library in Win32, but have always put up with the minor problems this can cause. In other ports it is compiled into some 24 separate libraries, and I have seen some recent moves in the windows build set in the same direction. The advantage of this library 'separation' is that for certain projects, using some of the simgear libraries, the externals like 'boost', 'PLIB', 'OSG',... can be avoided if only certain simgear libraries are used...
The list of simgear libraries is -
bucket, debug, environment, ephem, io, magvar, math, misc, nasal, props, route, scene/bvh, scene/material, scene/model, scene/sky, scene/tgdb, scene/util, screen, serial, sound, structure, threads, timing, xml...
To do the WIN32 MSVC build, I chose to use my amsrcs.pl perl scripts to generate the MSVC build files. This means I am no longer in need of an updated MSVC7, 8, 9, 10, ... set of build files, although, thanks to an increasing number of developers using and running windows, the SG build set is usually quite up-to-date. But I like this independence, rather than the game of chasing your tail ;=))
My 'amsrcs04' script is a massive re-write of the venerable am2dsp.pl, written by Curt yonks ago, that I think, has now been (sadly) removed from the GIT repository. It starts by reading, and parsing the configure.ac (or configure.in), seeking out the AC_OUTPUT(), and other things, to get the Makefile.am set. Each Makefile.am is then processed, and a DSP file written to build its components, libraries or binaries... then puts all that into a DSW file that can be loaded by any version of MSVC, and converted...
Of course, Curt's original am2dsp.pl only output a single SimGear.dsp, and dsw file, while this new amsrcs.pl version works on the same principles as the unix auto-tools... it writes a DSP file for each 'binary' designated in the particular Makefile.am file... even makes some effort to understand library dependencies, and adds these to the DSW output... so in effect splits simgear into all its parts...
Now that I have all the Makefile.am 'project' information in a set of perl hashes, it would also be relatively easy to have the script output a particular version of the later MSVC build file sets, but that has not been done. However, it would have to be done to support windows 64-bit compiling, since this option is not available in the now old MSVC6 DSW/DSP build files. Maybe when I get my new Windows 7 64-bit machine for the Dec/Jan holiday season ;=))
The build went relatively smoothly, after I remembered to make a simgear_config.h file ;=)). Just copied one of the simgear_config.h.[???] files for this... Ran into some trouble with some of the windows 'test' executables, like a missing SRC_DIR define... The script had done a reasonable job with many of the SG library dependencies, but some others like zlib, ... have to be accounted for...
And I could not help adding some code to decode_binobj to show how easy it is in SG to convert Cartesian coordinate to wsg84... to me the output looks 'better' than just a set of numbers... but this increased the dependence to include libsgmath, and libsgstructure... so that took a little longer to work out...
Test Binaries : bvhtest, decode_binobj, lowtest, openal_test1, openal_test2, openal_test3, openal_test4, propertyObject_test, props_test, routetest, SGGeometryTest, SGMathTest, socktest, tcp_client, tcp_server, testmagvar, testserial, waytest, ...
I did not do much testing of these, except as mentioned the mods in decode_binobj. Starting tcp_server, then tcp_client showed these had 'connected' and pass the 'hello' message... started to modify the openal test set to NOT be dependant on a fixed location of 'jet.wav' file, so I could run them... at least heard the sound in the first test, but did not fully pursue the others...
Now of course it remains to be seen how much use I get out of using these separate libraries ;=)) but the build experience was fun...
RUN WEB EXECUTABLES AT YOUR OWN RISK!
Also each of these is using the /MT /MTd runtime, but erroneously got named 'MD'
Description of downloads...
|SG-01-MD-msvc.zip||Contents of my 'msvc' build folder. Contains the MSVC DSW/DSP, and MSVC8 sln/vcproj build files, and a simgear-config.h, plus other things... Download this and unzip it into the source of SimGear, in the folder 'msvc' and start building, after you have attended to the external dependencies...|
|SG-01-MD-src.zip||My slightly modified source, but only in the 'test' executables. NOT essential or important.|
|SG-01-MD-lib.zip||Set of Debug and Release static SG libraries, built with MSVC8 in windows XP 32-bits, USING the MS 'static' runtime, /MT and /MTd.|
|SG-01-MD-bin.zip||Except for reviewing how-it-is-done in the code, this is a rather does nothing set of 'test' applications that use and test some parts of the SimGear library suite.|
A reminder that failure to ensure EACH and EVERY dependency is also built using the MS 'static' runtime, /MT /MTd, leads to catastrophic MSVC LINK errors. Although the linker can suggest this can be 'fixed' by deliberately EXCLUDING certain libraries from the link, this is VERY misleading ;=((. The ONLY solution is to make sure EVERY dependency used in the link process has the SAME 'static' runtime ... the ONLY possibility for full success ;=((.
Older DLL (/MD and /MDd versions)
Description of downloads...
|SG-01-msvc.zip||Contents of my 'msvc' build folder. Contains the MSVC DSW/DSP build files, and a config.h, plus other things... Download this and unzip it into the source of SimGear, and start building, after you have attended to the external dependencies...|
|SG-01-src.zip||My slightly modified source, but only in the 'test' executables. NOT essential or important.|
|SG-01-lib.zip||Set of Debug and Release static SG libraries, built with MSVC8 in windows XP 32-bits.|
|SG-01-3rd.zip||Zip of my Dell01:C:\FG\28\3rdparty folder, with lots of 'goodies'... includes part boost and osg includes... and simgear, plus examples of the monolithic single simgear.lib...|
|SG-01-bin.zip||Except for reviewing how-it-is-done in the code, this is a rather does nothing set of 'test' applications that use and test some parts of the SimGear library suite.|
The two main external dependencies are 'Boost', <http://www.boost.org/>, and 'OpenSceneGraph (OSG)', <http://www.openscenegraph.org/>, and these can not really be reduced, although I have tried, especially with boost.
At my last boost trunk update, July 2010, version 1_44, the full boost trunk download was 85000 plus files, 400MB, boost_1_44.zip, so I keep a sub-set, of some 750 files, just 4MB, boost-15.zip, and add to this small sub-set when ever the compiler requests something new... tedious, but the only way to save a few bytes ;=() Also my boost-15.zip contains a small fix to avoid a #pragma comment ( lib, "boostserialization.lib" ) in one of the boost headers.
Others are -
- GLUT - via freeglut static in my case;
- a sound library, here I use the OpenAL SDK to provided <AL/al.h>, alut, in my case built from the ALUT source available when downloading the OpenAL SDK, for <AL/alut.h>;
- png/zlib (libpng, zlib) - included through the SG-01-3rd.zip, but only needed if some of the 'test' applications that are also built.
- PLIB - SimGear has been gradually moving away from PLIB... and in fact one small change was to remove a now not needed <plib/sg.h> reference in one of the 'tests' files, I IRC.
External sources used in this build, but per the links given above, it is better to download from their respective home sties... and thus get any later versions available at the time...
|The full boost zip, to top up anything found missing in boost-15.zip above|
Onwards, and upwards...
EOP - sg-01.htm