Developer Setup for Windows with MinGW32

Configuring your Windows machine to compile XCSoar using the MinGW compiler.

Note: This creates just the PC/Windows version of XCSoar, not the versions that run on a PDA, PNA or Altair.

1) Download mSysGit

The development version of mSysGit includes the MinGW compiler and the mSys commandline tools, so you don't have to download them seperatly.

Git is the source code version control system used by the XCSoar team to maintain the source code for the project.
You will need the current development version of mSysGit (e.g. msysGit-fullinstall-1.6.4-preview20090729.exe) located at:

Attention: Make sure you have the development version, otherwise we can't compile XCSoar afterwards!

Download options of the mSysGit page

2) Install mSysGit

Install mSysGit by running the executable you just downloaded. Install it to "C:\", not "C:\msysgit" as suggested by the setup. The mSysGit folder will be created anyway. This might take a while since the Git executables will be compiled on your machine first.

3) Download and unpack the dependencies for compiling XCSoar

  • SVG tools (based on ImageMagick? and librsvg)
  • gettext (used for translations)

Download the following ZIP files and extract them to "C:\msysgit\bin".

4) Download the XCSoar source code from our repository

Open the mSysGit console (should be located at "C:\msysgit\msys.bat"). Type the following commands to enter your C: drive and prepare git to for the download:

 git config --global core.autocrlf false

 cd /c


Now enter the following command to download the source code into a new "xcsoar" folder:

 git clone git://git.xcsoar.org/xcsoar/master/xcsoar.git  


This will take a few minutes, and it will create a folder called "xcsoar" that contains the XCSoar project source code.

Git Clone on Windows with mSys

5) Compiling XCSoar

If you closed the mSysGit console, open it again. Now type the following commands to compile XCSoar via MinGW:

 cd /c/xcsoar/

 make WINHOST=y TARGET=PC


The WINHOST parameter is needed when compiling on Windows machines since the compiler executables have different names here.

Building on Windows with mSys


Troubleshooting

If you are running Windows 7 64bit you may encounter error that some DLL library file is missing. This is probably due to the system folder "Program Files (x86)" in your $PATH environment variable (because it contains parenthesis which are special characters on Un*x-like systems, so the msys console may have problems interpreting such path). The workaround for this error is either:

  • move the c:\msysgit\bin and c:\msysgit\mingw\bin to the begining of your system environment variable Path, or
  • copy the missing DLL libraries to the same folder in which the program resides
    • in practice, you may need to copy file c:\msysgit\mingw\bin\libexpat-1.dll to the c:\msysgit\bin\. (and probably also the library file vcomp90.dll or vcomp100.dll).

If you get the following error during compilation, the problem is most likely an outdated compiler. The 4.4.0 version of gcc had some known problems which have been fixed in later versions but the git package inclucing mingw-gcc still ships with this one. You could try to update the compiler and stdlibc++ to a more recent version (4.5 or above should work).

c:\msysgit\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/shared_ptr.h:204: error: cannot use typeid with -fno-rtti


Next steps

Attachments