Xcode code sense not working (Symbol not found)

3.6k Views Asked by At

I am new to development on Mac platforms and have recently started using Xcode for development in C++.

Now, whenever I want to look for definition of some class or struct, I click on Jump to definition in the secondary click menu, but Xcode shows up: Symbol not found. The indexing had been completed when I tried to look for definitions. Can anyone provide some solution to the problem?

The version of Xcode that I am using is 4.6 and MAC OS is 10.8.5. This is also happening on Xcode version 4.2 in OS X 10.7.5. Also, the file where I am trying to look for definition is in Objective-C.

2

There are 2 best solutions below

0
digory doo On

The answer to your problem is that Xcode isn't very good at this kind of thing yet. Sometimes it seems to work, sometimes it doesn't. It often doesn't work if there is an error in the same file, or if templates are involved (C++). Make sure the build process has completed (e.g. by running or trying to run the application.) And don't disable code sense in the preferences. ;)

0
Tim Overly On

I am not sure if this was the root cause of your issue, but this write up helped me:

http://hiltmon.com/blog/2013/07/07/xcode-4-code-completion-for-external-build-projects/

The issues was with the external build project and you can fix it by "including" an additional target.