|
|
|
|
|
|
Re: Indexer Problems when using eclipse CDT with Cmake [message #1797861 is a reply to message #1792615] |
Wed, 07 November 2018 14:36 |
Michael Fogle Messages: 2 Registered: February 2018 |
Junior Member |
|
|
I have similar problems with the indexer...it just can't find any of the system includes, e.g. <stdio.h>, <stdint.h>, etc. I never used to have any of these problems prior to the Luna version, then things started to go "sideways". I still am holding out that the problem is a cockpit error on my part.
I am using Eclipse CDT Oxygen on Ubuntu18.04, and generating my Eclipse project using "cmake -G"Eclipse CDT4 - Unix Makefiles" (version 3.10.2 of cmake), then in Eclipse "Import->General->Existing Projects into Workspace". (Also tried importing as a Makefile project - indexer actually ran, but still didn't find the system includes, and had other problems like losing all the build targets, etc.) The "C/C++ Include Paths and Symbols" list the proper system folders that contain the system includes. I even added the following to my top-level CMakeLists.txt file based on a forum post:
########################################################################
# Eclipse IDE (Oxygen) specific setup
########################################################################
set (CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT TRUE CACHE BOOL "For cmake CDT4 generator." FORCE)
set (CMAKE_C_COMPILER_ID "GNU")
set (CMAKE_CXX_COMPILER_ID "GNU")
set (CMAKE_C_PLATFORM_ID "Linux")
set (CMAKE_CXX_PLATFORM_ID "Linux")
...but to no avail. When doing "Import as existing project" (since the cmake generator made the project files), the Indexer doesn't even run when doing a "Rebuild".
I've looked through many, many forum posts (Eclipse, stackoverflow, others), but often they mention pulldown menus that don't even show up in my Eclipse Oxygen IDE (probably due to "Import as existing" vs "Import as Makefile". I imagine this has something to do with Discovery Providers, but have been unable to figure it out.
|
|
|
|
|
Re: Indexer Problems when using eclipse CDT with Cmake [message #1854520 is a reply to message #1792301] |
Tue, 23 August 2022 15:57 |
ervin jason Messages: 1 Registered: August 2022 |
Junior Member |
|
|
Kevin Thomas wrote on Sun, 15 July 2018 17:13
down vote
favorite
I have problems with the Index responsible for autocomplete and live code correction in eclipse CDT. When I setup an Eclipse project using the in eclipse CMAKE tools (New Project=>CMake Project) the indexer simply doesn't work and can't find any files outside the source directory (It can't find library headers, even the ones on /usr/).
It does sometimes kinda work if the inlcude_directory is set directly without usage of a variable, but its pretty random:
# this sometimes works
include_directories("/home/user/lib/test")
# this never does
set(PATH /home/marvin/Documents/trash)
include_directories(${PATH})
so is there a way to configure eclipses Index manually? So I can just add resource paths or something for the Indexer directly, so I can have code completion?
CDT gets all the compile commands and options from the compile_commands.json file in the build directory. If everything looks right there for you, please raise a bug and we can take a look.
[Updated on: Sat, 29 October 2022 22:21] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.07547 seconds