.. now, I’m using MinGW/MSYS (what’s the difference btw?) instead of Visual Studio. Apparently, those two can’t cope each other and since I’m gonna use Eclipse with MinGW/MSYS, I have to compile the OpenSceneGraph (OSG) with MinGW/MSYS too.
The good news is, OSG uses CMake. It helps a lot when dealing with many build system on many platforms (as long as it supports of course).
First, prepare the ammunition. Download CMake, MinGW/MSYS, OSG, and also OSG’s required 3rdParty libraries. Installing CMake should be straight forward. But maybe not the case for MinGW and MSYS. I already forgot how to install it, so just ask Google for this one =D
Extract the OSG somewhere, for example
C:OpenSceneGraph-2.6.1OpenSceneGraph-2.6.1. I have it extracted there already, so I just use it. Also don’t forget to extract the 3rdParty bundle into
Open CMake, point the source code directory to that directory, and also set the build directory if you don’t want to mess the source directory like me.
Click the configure button and select
MSYS Makefilesfor the generator.
CMake will then do the initial configuration. Adjust some configurations to fit your needs, such as
CMAKE_INSTALL_PREFIXif you want to change the OSG installation directory.
In my case, I also have to turn off the
BUILD_OSG_PLUGINSoption because it needs some other libraries which I don’t know. Since I just want to get the OSG compiled, it is easier for me to turn this one off rather than finding the libraries.
Click the configure button again.. and maybe again.. until the OK button can get clicked.
Finish the CMake by clicking the OK button. It will generate the requested build system.
Open the MSYS console. Go to the OSG build directory and let the two left “magic commands” do their job. The “
configure” part is already done by CMake.
$ make install
Let your fingers crossed, grab some tea or coffee, and wait until the compilation ends (hopefully).
Then.. let the coding continues.. =)
Find the source code at http://gist.github.com/55138