Skip to content
jgoppert edited this page Feb 12, 2012 · 26 revisions

Compiling JSBSim

Compiling for linux:

Get packages

sudo apt-get install build-essential libopenscenegraph-dev libqt4-dev libboost-dev

Download and compile the code

mkdir -P ~/home/Projects && cd ~/home/Projects
git clone git://github.com/jgoppert/jsbsim.git
cd jsbsim
mkdir -P build-linux
cd build-linux && cmake ..

Create a binary package

This step will create a binary debian package that you can install on your system. cd ~/src/Projects/jsbsim/build-linux && cpack

##Cross-compiling for windows:

Install mingw cross env:

This will take around 10 hours to complete so do it overnight. mkdir -P ~/home/Projects && cd ~/home/Projects http://mingw-cross-env.nongnu.org/ hg clone http://hg.savannah.nongnu.org/hgweb/mingw-cross-env cd mingw-cross-env && make install

Run ranlib over all libs

Some libraries may fail to link correctly. To prevent this rerun ranlib over all the static libraries. #!/bin/bash for file in $(find ./usr/i686-pc-mingw32/lib -regex ".+.a") do echo fixing $file ./user/bin/i686-pc-ming32-ranlib $file done

Setup path for cmake-mingw

In the file /.profile you should create an alias for cmake-mingw alias cmake-mingw=cmake -DCMAKE_TOOLCHAIN_FILE=/home/Projects/mingw-cross-env/usr/i686-pc-mingw32/share/cmake/mingw-cross-env-conf.cmake

Download and compile the code

mkdir -P ~/home/Projects && cd ~/home/Projects
git clone git://github.com/jgoppert/jsbsim.git
cd jsbsim
mkdir -P build-mingw
cd build && cmake ..

Create a windows installer

This step will create a nullsoft installer that you can use to install jsbsim on your system. cd ~/src/Projects/jsbsim/build-mingw && cpack

Clone this wiki locally