1

I can't navigate through a project in Eclipse (Oxygen.3a Release (4.7.3a) with CDT version 9.4.3.201802261533). The project is built successfully but I can't trace back many functions using ctrl+LMclick.

I tried fixing the problem from online resources, but many suggested modifying the entry of Preprocessor Include Paths, Macros etc, which my project does not even have. What is the reason behind this and how do I fix it?

enter image description here

For some reason, the next entry (C/C++ Include Paths and Symbols) shows that |Include path not found"

enter image description here

When I try to trace a function, I get the "Could not find symbol "xyz" in index". I have already tried rebuilding the indexer but it did not work for me.

Ahmed Al-haddad
  • 805
  • 2
  • 16
  • 41
  • Did you try to increase the scalabitlty ? your path are ok ? – Umaiki Jun 11 '18 at 07:57
  • Hi. I don't know how to increase scalability. I am new to eclipse and CDT. I have updated the question as the C/C++ Include paths and Symbols entry shows something that I thought may be missing from my project. – Ahmed Al-haddad Jun 11 '18 at 08:16

3 Answers3

2

In my experience, the absence of the Preprocessor Include Paths, Macros etc. preference page happens in newer versions of CDT when you select the new Makefile Project option in the new project wizard, whose description is

(Experimental) Create a new project that builds with the 'make' build tool using CDT's new Core Build System.

I would avoid using this as it's experimental, and would select instead C Managed Build (or C++ Managed Build). On the next wizard page you can still make it a makefile project if you want.

HighCommander4
  • 50,428
  • 24
  • 122
  • 194
1

I ran into this problem trying to use cmake4eclipse. I forgot to heed the warning in the help file, which explicitly state: "Do not choose the New C/C++ project wizard, as that will take you down the road of CDT`s new project type (which has poor cmake support)."

What this means is that, for the entry to appear in an executable / library -type project (not Makefile project), you have to do this now:

  1. File --> New --> Other...
  2. Choose "C++ Project" (not "C/C++ Project") under the C/C++ category:

enter image description here

P.S. Also, I had to remake the folder and copy all the sources there, i.e. when I tried the old wizard on top of a "deleted" project, something didn't override correctly and I was still missing "Preprocessor Include Paths, ...". Deleting .cproject and .project files within the folder before recreating works too.

Greg Kramida
  • 4,064
  • 5
  • 30
  • 46
0

Depending on your project, you may need to include the path of the toolchain manually. It wasn't for me. So for my project I did the following:

Go to Project – Properties – C/C++ Include Paths and add there “C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\arm-none-eabi\include” (change to fit your installation). Then refresh, clean and build the project. Finally, rebuild the indexer and this should work.

Ahmed Al-haddad
  • 805
  • 2
  • 16
  • 41