Unresolved inclusion: <gtkmm.h> [message #650784] |
Wed, 26 January 2011 09:23  |
Eclipse User |
|
|
|
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
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 #650855 is a reply to message #650784] |
Wed, 26 January 2011 15:59   |
Eclipse User |
|
|
|
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 ) 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 16:00] by Moderator
|
|
|
Re: Unresolved inclusion: <gtkmm.h> [message #651000 is a reply to message #650855] |
Thu, 27 January 2011 07:03  |
Eclipse User |
|
|
|
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).
|
|
|
Powered by
FUDForum. Page generated in 0.03724 seconds