Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse C/C++ IDE Cannot Find Header File in the Include Folder(I am working with a ROS Package in Eclipse C/C++ IDE)
Eclipse C/C++ IDE Cannot Find Header File in the Include Folder [message #1848867] Tue, 21 December 2021 15:06 Go to next message
Jasaj Balal is currently offline Jasaj BalalFriend
Messages: 1
Registered: December 2021
Junior Member
I had my Eclipse IDE setup so I could directly edit the package files in the catkin/src folder and build them in Eclipse (as opposed to importing them from the build folder). I had done this by linking the eclipse workspace project folder to the catkin src folder and specifying in the project C++ build settings that the include folders are ros include and the devel include folders. Everything was working just fine until I updated by OS, and now, Eclipse says it cannot find the header file which is in the include folder inside the package. I can catkin build the packages just fine. So, this is an Eclipse error. Can someone advise how I can fix this? Thank you.

My folder structure is shown in the attached screenshot. The source code is inside the src folder and the header file inside include.
Re: Eclipse C/C++ IDE Cannot Find Header File in the Include Folder [message #1848878 is a reply to message #1848867] Wed, 22 December 2021 07:27 Go to previous message
David VavraFriend
Messages: 1430
Registered: October 2012
Senior Member
You need to tell the Indexer to look in your include directory.

Unfortunately, there doesn't seem to be a way to do this with
the new presentation used in CMake projects. Frankly, I think
this is a bug

To get the old presentation, you have to import the project as
a Makefile Project. This will expose the Preprocessor Includes,
etc dialog where you can add User Entries. You may be able to
still run CMake with the menu Build if you change the build
command. Of course, you can always run it in a terminal.

Optionally, you could tell CMake to generate a makefile that
you would then use for builds.
Previous Topic:How to static link with mingw x64 C++ runtime and openssl?
Next Topic:CMake Unresolved inclusion: <iostream>
Goto Forum:

Current Time: Sat Oct 01 14:50:44 GMT 2022

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

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

Back to the top