Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unresolved Symbols
icon9.gif  Unresolved Symbols [message #913330] Sat, 15 September 2012 09:22 Go to next message
Pete Miller is currently offline Pete Miller
Messages: 11
Registered: September 2012
Junior Member
Hi Community,

I've a lot of trouble with unresolved symbols in Eclipse CDT Indigo. Below an example:

// File01.c

# define name


// File02:Application.h

# ifndef name
# define pete


// File02:Application.c

int main
{
Function(pete); //the symbol pete can not be resolved!
}


Question: Is there a way to resolve the symbol "pete" with the Indexer?
Re: Unresolved Symbols [message #913469 is a reply to message #913330] Sat, 15 September 2012 18:40 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 09/15/2012 04:22 AM, Pete Miller wrote:
> Hi Community,
>
> I've a lot of trouble with unresolved symbols in Eclipse CDT Indigo.
> Below an example:
>
> // File01.c
> # define name
>
>
> // File02:Application.h
>
> # ifndef name # define pete
>
> // File02:Application.c
> int main { Function(pete); //the symbol pete can not be resolved!
> }
>
>
> Question: Is there a way to resolve the symbol "pete" with the Indexer?
In your example pete isn't defined, so how can the indexer resolve it?
ifndef checks to see that the argument isn't defined. In your example
name is defined so the ifndef name is false and the define pete won't
happen.
Re: Unresolved Symbols [message #915182 is a reply to message #913469] Sun, 16 September 2012 18:54 Go to previous messageGo to next message
Pete Miller is currently offline Pete Miller
Messages: 11
Registered: September 2012
Junior Member
Is there a workaround in the CDT settings to resolve the symbol (pete) without changing the source?

Thanks in advance.
Re: Unresolved Symbols [message #915205 is a reply to message #915182] Sun, 16 September 2012 20:15 Go to previous messageGo to next message
Marjon Zubiri is currently offline Marjon Zubiri
Messages: 5
Registered: September 2012
Junior Member
deinfe 'name' in your pre-processor settings. Then it will define 'pete'
Re: Unresolved Symbols [message #915612 is a reply to message #915205] Mon, 17 September 2012 16:28 Go to previous messageGo to next message
Pete Miller is currently offline Pete Miller
Messages: 11
Registered: September 2012
Junior Member
Marjon Zubiri wrote on Sun, 16 September 2012 16:15
deinfe 'name' in your pre-processor settings. Then it will define 'pete'


Do you mean #pete with value 0? I tried it, but it doesn't work.
icon9.gif  Re: Unresolved Symbols [message #917031 is a reply to message #913330] Wed, 19 September 2012 18:53 Go to previous messageGo to next message
Pete Miller is currently offline Pete Miller
Messages: 11
Registered: September 2012
Junior Member
Is this for Bugzilla?
icon9.gif  Re: Unresolved Symbols [message #919860 is a reply to message #913330] Sat, 22 September 2012 12:33 Go to previous message
Pete Miller is currently offline Pete Miller
Messages: 11
Registered: September 2012
Junior Member
Is there another way to switch off some preprocessor directives for the Indexer? I need the F3 Key functionality for the described example.
Previous Topic:Updating the GCC on OSX 10.8
Next Topic:Setting up Eclipse for C++
Goto Forum:
  


Current Time: Tue Sep 16 15:38:28 GMT 2014

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

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