From FlightGear wiki
Revision as of 15:14, 20 April 2006 by Hellosimon (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Compiling FlightGear under the MSYS command line environment

Giles Robertson, 2004 Written 1/05/2004 This file is in the public domain.

Additional Contributors:

Last revised:

Acknowledgments: Andy Ross, who a) built the binary libraries needed by hand and b) wrote up how to compile using mingw32 on Cygwin/Linux, both of which were essential when writing this.

Comments/suggestions/flames to the flightgear-devel list

This gives instructions on how to build FlightGear under the MSYS environment. This was written for compiling a CVS checkout at 01/05/2004. I assume you have a fairly minimal knowledge of standard unix commands. You also need a working CVS client at present.

1) Download MingW from (Downloads page, look for MingW-x.x.x.exe among the plethora of packages)

2) Install it. I installed it to C:\mingw, but one could conceivably install it anywhere. It isn't material.

3) Download MSYS from (Downloads page again, this time look for MSYS-x.x.x.exe)

4) Install that. After it has installed, it will ask to do a post install process. Let it. It will ask you for where you installed MingW. Give it the path you installed in step 2)

5) Download and install the Creative OpenAL SDK (follow link from

6) Create a folder to put your fgfs sources in. I used C:\fg (under msys, this is /c/fg )

7) Download Plib 1.8.3 (though anything later than 1.7.0 should work) from

(NOTE: If FG 0.9.5 is out, you can skip the next two steps and grab the files straight from (CVS instructions are available at

8) Checkout SimGear from

9) Checkout FlightGear from

10) Run msys.

Type :

mkdir /fg

CD to the directory you have your source files in (that you made in step 6) If you followed step 6:

cd /c/fg

11) Install Andy's binary libraries.

Download to C:\fg Type (in MSYS)

cd /fg
tar xvzf /c/fg/fgfs-mingw-libs.tar.gz
tar xvf openal.tar
tar xvf pthread.tar
tar xvf sdl.tar
tar xvf zlib.tar

Rename /fg/bin/pthread.dll to pthreadGC.dll

NOTE: You may have to find pthread.h (in /fg/include) and comment out line 154, the line containing #include "config.h", if you get a build error when building SimGear

12) Download and install Glut

The compilation of flightgear requires that Glut be present, even though plib may be compiled without it. Download win32 dll's of glut from and unzip it in a folder.

At the time of writing, October 6, 2005, the direct link to the zip file is

Copy *.lib into /fg/lib Copy *.h into /fg/include/GL Copy *.dll into /fg/bin

13) Build and Install plib


cd /c/fg
tar xvzf plib-1.8.3.tar.gz
cd plib-1.8.3.tar.gz
./configure --prefix=/fg
make install

14) Build and Install SimGear

If you grabbed a tarball off the website, untar it before proceeding

cd /c/fg
cd simgear
./configure --prefix=/fg
make install

15) Build and Install FlightGear

If you grabbed a tarball off the website, untar it before proceeding (and substitute source for your fg src directory?

At present, we only make the /src directory as the others do not work automatically?

cd /c/fg
cd source
./configure --prefix=/fg --enable-sdl
cd src
make install

16) Strip the binaries

cd /fg/bin
strip *.exe

17) Install the base package (from CVS or the website) and tell FlightGear where it is.

18) Fly.