RE: newbie/easyquestion: setting up IDE for gtkmm projects

>>#include </usr/include/gtkmm-2.4/gtkmm.h>

That's not the PREFERRED way to include headers(of any library). You should learn to use pkg-config which spits out the correct switches/paths for every library you want. All you need to do is something like this:

#include <gtkmm/gtkmm.h>

Then at the command line do somethng like this on the source file: g++ hello.cpp `pkg-config gtkmm-2.4 --cflags --libs` -o hello
NOTICE the backticks, they are important.

Now for eclipse you're better off asking/searching the question on their forum on where exactly to put this command. As a general IDE rule, you open your project, then through the menus you locate&open the "build options/properties" for your project. There you search:
1.for the COMPILER and put as command the `pkg-config gtkmm-2.4 --cflags`
2.for the LINKER and put as command the `pkg-config gtkmm-2.4 --libs`

I don't know the exact way for eclipse. As I said, ask/search their forum(or on google).

NOTE: you don't need to include the gtk headers.

Μείνετε συνδεδεμένοι με τους φίλους σας στο Zoo Κάντε κλικ εδώ!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]