Symbol Not Found

I recently was playing around with something in Xcode using a project created using the OS X Command Line Tool. I am fairly new when it comes to objective-C (will move to Swift soon) and was playing around with mathematical constants. An example of a very simple piece of code would be:


NSLog(@"\u03c0 is %f", M_PI);


Output --> π is 3.141593


I wanted to view the definition for M_PI in the math.h file. But when I command-click on the contant M_PI in the code, I get a small error box that pops up with a question mark and test above it stating, "Symbol Not Found".



I have searched far and wide for a solution. One such solution, seemed promising, telling me to navigate to Xcode/preferences/locations and navigate to the derived data and delete its contents. This was unseccessful. I am out of ideas and really hope someone might be able to assist me! Thanks in advance.

>Xcode/preferences/locations and navigate to the derived data and delete its contents.

Try that again, but this time... use Xcode's Product menu, then, with the option key pressed, select 'Clean Build Folder'. Confirm no errors in the navigator and go again.

◅▻

Actually, I think it's because M_PI is a defined constant (in effect, a macro) so it's not really a symbol. To see its value, right click on M_PI and select "Jump to Definition" (or "Jump to Declaration" -- I can't remember -- I don't have Xcode in front of me right now). That should take you to the place in math.h where M_PI is defined.

Symbol Not Found
 
 
Q