Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse can't find includes(After import of existing project editor can't find include files)
Eclipse can't find includes [message #1815651] Mon, 07 October 2019 16:14 Go to next message
Eclipse UserFriend
Hi all;
I'm a newby and this problem has been driving me nuts for weeks. I have an example project in Deal.II that is set up to use cmake. I run
cmake -G "Eclipse CDT1 - Unix Makefiles" . 
on the step-1.cc file which sets up the file as an Eclipse project. I then run make to complete the process. There are no errors and the project runs properly. When I do and "Import => Existing project into workspace", the project loads into Eclipse fine, except that the editor can't seem to find the include files. I have tried Refresh, all of the various Index functions and even rebuilds. Nothing works. The really puzzling thing is that all of the include files are listed under includes in the " C/C++ Project" panel.

OS - Debian Stretch Linux
KDE Desktop
AMD 4 core processor
16 GB ram, 1TB hard disk

Please help

GaryR.



Re: Eclipse can't find includes [message #1815660 is a reply to message #1815651] Tue, 08 October 2019 01:08 Go to previous message
Eclipse UserFriend
When you make a CMake project, there is no obvious way to add paths to the Indexer.
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. is missing.
I was able to add a directory named inc that the Indexer eventually found and processed OK
but the compiler builtins were not scanned so all references to std:: were flagged.
I used include_directories in the CMakeLists.txt file to do this.

What I usually do is import the project as C++ --> Existing Code as Makefile Project
I do the same thing with Autotools projects.
Then manually run cmake or autotools to create the makefile.

If you aren't running cmake a lot, you may want to consider doing this yourself.
Previous Topic:Setting memory view's radix/endianness
Next Topic:Remote debug terminated
Goto Forum:
  


Current Time: Wed Jun 18 11:54:52 EDT 2025

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

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

Back to the top