Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add base classes to "New C++ Class" dialog

In Eclipse:

When I select In "File/New/Class/Add...",

I can see base class candidates from boost::, std::, sql::, and my current project.

I would like to add the Gnome classes (Gtk::, Glib::, etc.) to the list of candidates. Anybody know how to do that?

like image 233
Adiabat Avatar asked Feb 28 '12 16:02

Adiabat


1 Answers

Eclipse CDT will only offer you classes to choose from if its indexer knows about them. To be able to add Gnome classes you might need to add the corresponding include directories to your project's include path (project->properties->c++ build->settings->c++ compiler->includes ...)

If you have done that already, you might try to rebuild the index for your project. If you use such a class you want to inherit from and can CTRL-click its name and jump to its definition/declaration then the index should be OK.

However, if Gnome will have headers that are hard to parse for CDT (e.g. macro settings required before you can use them), you might still have problems. I have no experience with Gnome to actually tell you if it is so.

like image 200
PeterSom Avatar answered Oct 20 '22 15:10

PeterSom