Howto:Cross platform development

From FlightGear wiki
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.

1rightarrow.png See Building FlightGear - Cross Compiling for the main article about this subject.

Unfortunately, it is still relatively complicated for new contributors to get started building FlightGear from source, especially for people who are primarily Windows users and not used to *nix platforms like Unix, Linux or Mac OS.

This may even apply to people who are very experienced C++ developers, but who just may not have had any previous exposure to Linux/Unix yet.

This is largely because of FlightGear's build system which used to be based on the GNU autotools tool chain (i.e. Makefiles). While things are starting to improve now due to the use of cmake, it is still not necessarily very straightforward to set up a working build system to compile FlightGear and all its dependencies from source on Windows machines, especially for novice users who are new to the project.

This article is dedicated to describing a "hybrid" approach, where development itself takes place on a Windows host computer, but compilation, debugging and profiling take place on a Linux box remotely, by using a SSH connection.

This workflow is natively supported by a number of IDEs (Integrated Development Environments), such as Eclipse, Netbeans and some others.

Obviously, you will need to have access to a Linux server to do your build there. So if you don't have a Linux box at home, you will obviously also need an internet connection while doing development.

(alternatively, you might want to consider setting up a coLinux service under Windows)

Fortunately, getting access to a Linux server isn't too complicated. There are countless paid VPS (virtual private server) packages available, and even some free hosting packages providing VPS access.

However, for the sake of this article we will only cover using the GCC project's "compile farm". This is because, access to the GCC compile farm is provided free of charge to all open source projects and developers on an "opt in" basis:

The GCC Compile farm project maintains a set of machines of various architectures and provides ssh
access to free software developers, GCC and others (GPL, BSD, MIT, ...).

So people wanting to contribute to FlightGear are automatically eligible because FlightGear is GPL'ed software.

Another added advantage of the GCC compile farm is the plethora of machines and architectures available, as developers get access to all machines automatically:

Once your account application (see below) is approved, you get full ssh access to all the farm machines
(current and new)

Supported platforms include:

  • i686
  • x86_64
  • armv5tel
  • armv7l (with vfp and neon FPU instructions)
  • powerpc
  • powerpc64
  • Cell SPE (Sony Playstation 3)
  • sparc
  • sparc64 (sparcv9)
  • alpha (currently offline)
  • mipsel
  • mips64el
  • ia64
  • hppa

To request an account, just see: http://gcc.gnu.org/wiki/CompileFarm#How_to_Get_Involved.3F


After getting your login credentials, the next step will be to set up your IDE of choice to remotely compile software on the compile farm servers.

If you intend to do cross-platform development (i.e. MingW32), then you'll first of all have to install a cross-compiler in your home directory.

Next, you'll need to check out all the FlightGear sources and their dependencies (boost, PLIB, OSG, OpenAL,SimGear,FlightGear).


If you find eclipse too bloated an IDE, you might want to look into BVRDE instead, which is fairly lightweight and supports remote-compilation natively, too.