09 March 2013

Linux port with Eclipse progress update

Yesterday I started porting RCC++ to Linux, using the Eclipse IDE as this seemed the favourite option, or at least that's what's been specifically asked for. It's been a while since I've done any serious Linux/Unix coding, and that was in the days before decent IDEs using vi and simple makefiles, so it took a fair few hours to get done. There's now a working version of the runtime compiler and ConsoleExample in my personal fork of RCC++, which I'll pull onto the main fork after some further testing.

[EDIT 2013/11/03]: The code (with a few fixes) has now been pulled into the main fork at Github.

The base RCC++ libaries and the ConsoleExample have no dependencies, so the most difficult problem was getting __FILE__ to reliably generate full paths, since Eclipse builds each project from the path of the output. This required embedding the compile path using COMPILE_PATH=\"$(PWD)/\" as a preprocessor define option (-DCOMPILE_PATH=\"$(PWD)/\" on the gcc command line), which uncovered some bugs in my FileSystemUtils header. Note that the executable needs to be build with the flag -export-dynamic in order to allow symbol resolution by name.

I've not yet ported the rather complex SimpleTest (which needs renaming) due to the dependencies, but this shouldn't stop anyone from using the base libs. Additionally, I'm a little at a loss as yet as to the best way to distribute multiple eclipse projects which are part of a hierarchy. For now you'll need to manually add them to your workspace, which eclipse makes easy by defaulting project files to being hidden. I feel that I've not yet spent enough time with the IDE to complain, but it seems like a good part of a programmers life is fighting the build systems rather than using the language.

No comments:

Post a Comment