-
Notifications
You must be signed in to change notification settings - Fork 59
Compiling MinGW
jgoppert edited this page Apr 6, 2012
·
2 revisions
This will take around 10 hours to complete so do it overnight.
sudo apt-get install mercurial
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
Some libraries may fail to link correctly. To prevent this rerun ranlib over all the static libraries.
for file in $(find ./usr/i686-pc-mingw32/lib -regex ".+\.a")
do
echo fixing $file
./user/bin/i686-pc-ming32-ranlib $file
done
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
In the file ~/.profile you should also add the cross-compiler to the path so autotools projects can find it.
PATH="~/home/Projects/mingw-cross-env/usr/bin:$PATH"
mkdir -P ~/home/Projects && cd ~/home/Projects
git clone git://github.com/jgoppert/jsbsim.git
cd jsbsim
mkdir -P build-mingw
cd build-mingw && cmake-mingw -DWITH_GUI=y ..
The -DWITH_GUI option enables the trimming gui and can be disabled if necessary by not specifying the option or setting it to "n" instead of "y".
This step will create a nullsoft installer that you can use to install jsbsim on your system.
cd ~/src/Projects/jsbsim/build-mingw && cpack