Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Type GObject could not be resolved(Eclipse resolved all header, but shows all every member as unresolved )
Type GObject could not be resolved [message #1823835] Thu, 02 April 2020 19:31 Go to next message
illia Barbashov is currently offline illia BarbashovFriend
Messages: 2
Registered: April 2020
Junior Member
After I created a Makefile project to play around with glib and GObject I'm having this issue. Eclipse shows that GObject could not be resolved, when the header file
#include <glib-2.0/glib-object.h>
for it is resolved. here is the screenshots

index.php/fa/37733/0/

I also able to go by link and open glib-object.h header file in eclipse, so I assume it resolved,


index.php/fa/37734/0/

as well as I'm able to build the project using eclipse, here is my makefile:

index.php/fa/37735/0/

Could someone point me what I'm doing wrong or how it can be resolved?
Re: Type GObject could not be resolved [message #1823912 is a reply to message #1823835] Fri, 03 April 2020 17:39 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
You have to tell two different things where your headers can be found:

  1. the compiler via the makefile
  2. the CDT Indexer

They are independent.

To do (1) Set the include path for each compiler at:
Project --> Properties --> C/C+ Build --> Settings --> Tool Settings tab --> <compiler> --> Includes
This only works when Eclipse is generating the Makefile.

To do (2) Set the include path as a User Entry at:
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Entries tab --> <language>

You can do both with:
Project --> Properties --> C/C++ General --> Paths and Smbols
but you need the CDT Managed Build Settings provider enabled in
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Providers tab

[Updated on: Fri, 03 April 2020 17:45]

Report message to a moderator

Re: Type GObject could not be resolved [message #1823914 is a reply to message #1823912] Fri, 03 April 2020 18:51 Go to previous messageGo to next message
illia Barbashov is currently offline illia BarbashovFriend
Messages: 2
Registered: April 2020
Junior Member
I tried to check your suggestion, but at first point I found that my project settings doesn't contain C/C++Build entry, than I compared it with another project in my workspace that doesn't use glib and works fine, and I found that it has C/C++Built entry in project properties. So I checked the project nature and found this

index.php/fa/37741/0/

The reason why is that so it's because I created project using Makefile configuration which is stated as Experimental

index.php/fa/37742/0/

So I recreated the project as C/C++ Managed Build and than mentioned by you properties appeared.

index.php/fa/37743/0/

index.php/fa/37744/0/

But the initial problem still presents. I don't know, maybe I miss something, but to me it looks like all tools is set and includes are in place.

[Updated on: Fri, 03 April 2020 18:54]

Report message to a moderator

Re: Type GObject could not be resolved [message #1823928 is a reply to message #1823914] Sat, 04 April 2020 01:59 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
I've had similar problems with glib.
Sometimes just rebuilding the index works.
Sometimes it just takes time.

I know. Not much help.

As for Makefile Projects, I import the code instead of starting a new project.
File --> Import --> C/C++ --> Existing Code as Makefile Project

Previous Topic:ESP-IDF Plugin
Next Topic:Make "[ all Configurations ]" default when editing C/C++ properties
Goto Forum:
  


Current Time: Thu Mar 28 10:04:53 GMT 2024

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

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

Back to the top