# Why won't this ClanLib “Hello World” project build in Eclipse CDT?

I've been trying to get a simple Hello World working with ClanLib using CDT (Eclipse), but I'm just not getting it configured properly.

First, from the command line, I'm able to get it to run using this command:

g++ -o mygame mygame.cpp pkg-config --cflags --libs clanCore-2.3 clanDisplay-2.3 clanGL-2.3 clanGL1-2.3 clanApp-2.3 -lpthread


So no problems there.

Anyways, I tried setting up the correct build settings in Eclipse, but I just don't know where I'm supposed to add the info for the libraries. I tried adding it in the linker section, that didn't work. I tried a bunch of other things, nothing seemed to work...

Help would be appreciated, possibly as comprehensive as possible... I'm open to alternatives to Eclipse too. And the only reason this is such a problem is because this is the first time I'm trying to start a bigger C++ project, and I decided perhaps it's best to use some tools to make it a little easier, rather than a basic text editor (especially for debugging).

Oh, and I'm running Ubuntu, if that makes a difference. I'm really surprised there aren't any tutorials for setting up ClanLib in a development environment as popular as Eclipse...

1. ->Libraries: add name of each lib you need without -l.
2. ->Miscellaneous->Linker flags: add name of each lib you need in this textfield with -l prepended in every instance.
And of course under Libraries, make sure you have set up your library search paths (usually "yourlib/lib" -- I would use absolute paths here, and make sure they're enclosed in double quotes.
PS. Check the Console window to see what Eclipse is outputting for the g++ command.