Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unresolved inclusion: <gtkmm.h>
Unresolved inclusion: <gtkmm.h> [message #650784] Wed, 26 January 2011 14:23 Go to next message
No real name is currently offline No real name
Messages: 2
Registered: January 2011
Junior Member
Hello!

I am using Windows 7, MinGW and the MSYS build system, I have installed gtkmm.

When having created a C++ Project in Eclipse CDT, I used the "Linux GCC" toolchain and "Gnu Make Builder" as builder.

I managed to configure the C++ compiler to add the following flag

`pkg-config gtkmm-2.4 --cflags`


and the C++ linker to add the following flag

`pkg-config gtkmm-2.4 --libs`


Compiling a program when having

#include <gtkmm.h>


works.

Now to the problem: Eclipse shows "Unresolved inclusion: <gtkmm.h>". I can't use Eclipse's abilities like CTRL+SPACE and stuff.

I guess it is because I have NOT explicitly given the include paths. There are many and I want to use the pkg-config method and NOT putting all paths in Eclipse separately.

How can I get rid of the problem? Can I cheat the indexer in some way?
Re: Unresolved inclusion: <gtkmm.h> [message #650798 is a reply to message #650784] Wed, 26 January 2011 15:41 Go to previous messageGo to next message
John McCabe is currently offline John McCabe
Messages: 179
Registered: July 2009
Senior Member
>I guess it is because I have NOT explicitly given the include paths. There are many and I want to use the pkg-config method and NOT putting all paths in Eclipse separately.
>
>How can I get rid of the problem? Can I cheat the indexer in some way?

I don't think you can use plg-config to do this on Windows/Eclipse.
There was a thread a little while back entitled "GTK+ From the ground
up" that I was involved in; I'd suggest reading through that in case
it's of any help.
Re: Unresolved inclusion: <gtkmm.h> [message #650809 is a reply to message #650784] Wed, 26 January 2011 16:42 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1952
Registered: July 2009
Senior Member
Quote:

Now to the problem: Eclipse shows "Unresolved inclusion: <gtkmm.h>". I can't use Eclipse's abilities like CTRL+SPACE and stuff.

I guess it is because I have NOT explicitly given the include paths. There are many and I want to use the pkg-config method and NOT putting all paths in Eclipse separately.

How can I get rid of the problem? Can I cheat the indexer in some way?

Eclipse (or better said the internal indexer) should find the header after the first compilation. The indexer will scan the build output and find all include paths.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Unresolved inclusion: <gtkmm.h> [message #650855 is a reply to message #650784] Wed, 26 January 2011 20:59 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 2
Registered: January 2011
Junior Member
Quote:
Eclipse (or better said the internal indexer) should find the header after the first compilation. The indexer will scan the build output and find all include paths.


If gtkmm is not in MinGW directory, at least for me it does not find it.

Long story short, didn't have time to read yet but now it kind of works.

Here's it for other ppl:

Have installed MinGW + MSYS in C:\MinGW and gtkmm in C:\gtkmm. To use MSYS, have your system variables set correctly!

GTKMM_BASEPATH is "C:\gtkmm",
Path: "C:\gtkmm\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;..."

Add `pkg-config gtkmm-2.4 --cflags` (including single quotation marks; this is for MinGW/MSYS!) under C++ Compiler/Misc/Other flags.

Add `pkg-config gtkmm-2.4 --libs` under C++ Linker/Misc/Linker flags.

Edit C++ Linker/Command line pattern in the way to move "${FLAGS}" at the end and KEEP SPACES as they make sense.

Use toolchain: Linux GCC and Gnu Make Builder

Under "Binary Parsers" activate "PE Windows Parser".

Enable Indexer with "... unused headers as C++ files" AND "... C files".

Go to Paths and Symbols/Source Location. Click "Link Folder" and in there check "Link to folder...", browse to C:\gtkmm\include and give the foldername something you want to.

If you delete the .exe and recompile, you will get some error because the whole added directory is getting compiled which makes no real sense.

Thus, right lick (oh my i forgot a "c" before lick lolo Rolling Eyes ) on the "linked folder" in Project Explorer/Resource Configurations/Exclude from Build.

Rebuild and be happy to use gtkmm with pkg-config and no unresolved symbols (hopefully, at least it seems to work for me right now).

[Updated on: Wed, 26 January 2011 21:00]

Report message to a moderator

Re: Unresolved inclusion: <gtkmm.h> [message #651000 is a reply to message #650855] Thu, 27 January 2011 12:03 Go to previous message
John McCabe is currently offline John McCabe
Messages: 179
Registered: July 2009
Senior Member
Thank you very much for taking the time to post those instructions.


On Wed, 26 Jan 2011 15:59:38 -0500, <eclipseforum1112@mailinator.com>
wrote:

>Quote:
>> Eclipse (or better said the internal indexer) should find the header after the first compilation. The indexer will scan the build output and find all include paths.
>
>
>If gtkmm is not in MinGW directory, at least for me it does not find it.
>
>Long story short, didn't have time to read yet but now it kind of works.
>
>Here's it for other ppl:
>
>Have installed MinGW + MSYS in C:\MinGW and gtkmm in C:\gtkmm. To use MSYS, have your system variables set correctly!
>
>GTKMM_BASEPATH is "C:\gtkmm",
>Path: "C:\gtkmm\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;..."
>
>Add `pkg-config gtkmm-2.4 --cflags` (including single quotation marks; this is for MinGW/MSYS!) under C++ Compiler/Misc/Other flags.
>
>Add `pkg-config gtkmm-2.4 --libs` under C++ Linker/Misc/Linker flags.
>
>Edit C++ Linker/Command line pattern in the way to move "${FLAGS}" at the end and KEEP SPACES as they make sense.
>
>Use toolchain: Linux GCC and Gnu Make Builder
>
>Under "Binary Parsers" activate "PE Windows Parser".
>
>Enable Indexer wirh "... unused headers as C++ files" AND "... C files".
>
>Go to Paths and Symbols/Source Location. Click "Link Folder" and in there check "Link to folder...", browse to C:\gtkmm\include and give the foldername something you want to.
>
>If you delete the .exe and recompile, you will get some error because the whole added directory is getting compiled which makes no real sense.
>
>Thus, right lick (oh my i forgot a "c" before lick lolo :roll: ) on the "linked folder" in Project Explorer/Resource Configurations/Exclude from Build.
>
>Rebuild and be happy to use gtkmm with pkg-config and no unresolved symbols (hopefully, at least it seems to work for me right now).
Previous Topic:symbol(s) not found - MacBook 10.5.8 Leopard during Build
Next Topic:Problem with Symbols used in .h but defined in a .cpp
Goto Forum:
  


Current Time: Mon Sep 22 06:26:41 GMT 2014

Powered by FUDForum. Page generated in 0.07501 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software