Development on Linux
Some of these instructions may also be applied to other similar operating systems (such as *BSD) and mingw32 on Windows.
You need:
- GNU make
- a C++ compiler for your target platform (e.g. gcc, mingw32, cegcc)
- Perl
- for the Unix port: SDL, SDL_gfx, SDL_ttf
The make command runs the build. You should set the TARGET parameter to select a target platform for the XCSoar binary. The file build/targets.mk has a list of all supported targets. Common targets: PC is the Windows PC build, UNIX is for Linux and other Unix-like operating systems, PPC2003 for PocketPC 2003. Example:
make TARGET=PC DEBUG=y -j4
This command compiles the Windows PC version of XCSoar, with debugging enabled. -j4 uses up to four CPU cores at a time, speeding up the build.
Debugging
The GNU debugger (gdb) is the number one choice on Linux. Once the Linux port is complete, you can use it (or any of its many frontends) to debug XCSoar. Debugging cross-compiled binaries can be tricky, see the following sections.
Debugging with winedbg
WINE has a debugger, which can be used with the following command:
winedbg XCSoar-PC.exe
winedbg also provides a gdb server, if you prefer gdb.
Debugging remotely with gdb
You can run a gdb server on a real Windows PC or on a VM, and connect to it from gdb running on Linux. For this, you need a gdb binary which runs on Linux, but debugs mingw32 binaries. The cegcc project has binary downloads for a gdbserver.exe binary for the PocketPC.
