Since I said I wanted to work on the GameBoy emulator project in a new environment, I was checking out some possible IDEs in Linux and have decided to go with Eclipse CDT, the C++-IDE version of Eclipse. I looked at some other popular IDEs such as Anjuta or KDevelop (which is getting some really fancy features and should definitely be checked out again), but in the end getting a project up and running with Eclipse felt like the least effort. Concerning the GUI framework, I decided to go for Qt.
I’ll outline the steps necessary to get the IDE running, mind you that I’m not a linux expert so some steps might be backwards, and I’ll probably leave some details out.
Since it’s probably the most widespread Linux and therefore the easiest to find help for, I went with Ubuntu Linux, available at www.ubuntu.org. If, like me, you start out with an installed Windows, a tip is to use the Linux Live USB creator, which makes it extremely easy to download the latest version of Ubuntu and create a bootable USB stick from it.
(As a side-note, I’m quite impressed how easy it has become to install Linux. However, to not put things out of perspective, I was also impressed by the ease of the Windows 7 installation).
Under Ubuntu/Debian, there’s always the question if you want to go with the (possibly outdated) versions of software in the repository available using apt-get. Since eclipse doesn’t really have to be installed explicitly, I decided to use the up-to-date version from www.eclipse.org. The CDT (C++ Development Tooling) version is available via the Downloads page.
By default Ubuntu only installs the GCJ Java virtual machine, since eclipse seems to have problems with that VM I downloaded the Sun VM and start eclipse with the command “eclipse -vm /path/to/JRE”.
Update: Using the default fonts and font sizes of Ubuntu, Eclipse wastes an insane amount of screen space, to the point where my 24 inch monitor seemed too small. This blog post describes what can be done to counter this (works similarly for Ubuntu).
Since Qt has been taken over by Nokia, it is now available at their site: http://qt.nokia.com/downloads. If all requirement are installed, a simple “./configure”, “make”, “make install” should suffice, otherwise, the configuration script will report the missing files. The Qt Eclipse integration installation on Linux is described here.
It seems like there is not really a good replacement for TortoiseSVN in Linux, so for me the solution was to use a SVN client integrated in Eclipse. This can be achieved using the Eclipse Subversive Team Provider available here.
In a nutshell using SVN is allowed by the two following steps:
Install the “Subversive SVN Team Provider” from the Galileo Software Site.
Install a Subversive SVN Connector from the software site http://community.polarion.com/projects/subversive/download/eclipse/2.0/galileo-site/.
The last step is then to configure the SVN connector to use in the Preferences, Team->SVN.
Writing an emulator includes writing code which interprets commands of the target architecture as faithfully as possible. This sounds to me like a task that screams unit testing, therefore, I looked into a good unit testing framework compatible with Eclipse. It seems like this is the case with the CUTE (C++ Unit Testing Easy) framework, available and described here.