typdef Problems [message #131537] |
Tue, 14 December 2004 07:23  |
Eclipse User |
|
|
|
Originally posted by: An.nym.us
Hi there,
I experience following problem :
if I make a
typdef int SOMETHING;
all functions like
SOMETHING myFunction()
{
return 1;
}
Hover says :
"Attempt to use Symobol failed" : SOMETHING
1. Are unable to be folded
2. Are not shown in the Outline <- This is especially bad.
Any pobibility to make the SOMETHING work with fold + outline ?
Thanks , Sascha
|
|
|
|
|
Re: typdef Problems [message #131579 is a reply to message #131555] |
Tue, 14 December 2004 08:55  |
Eclipse User |
|
|
|
For the outline view and code folding, make sure you have "Follow #include's
when parsing working copies" turned off. (Window->Preferences->C/C++)
When that option is turned off (which it is by default), the parser doesn't
follow includes when building the outline view and instead makes guesses as
to what different things are, and in this case it will correctly assume that
SOMETHING is a type and your function will fold and show up in the outline
properly.
If however, you want that option on, then you need to make sure that your
include paths and predefined macros are set up properly so that the parser
can find your includes and hence find the definition of SOMETHING.
-Andrew
"Sascha" <an@nym.us> wrote in message news:cpmocj$m2o$1@www.eclipse.org...
> Sascha wrote:
>
> > Hi there,
> > I experience following problem :
>
> > if I make a
> > typdef int SOMETHING;
>
> > all functions like
>
> > SOMETHING myFunction()
> > {
> > return 1;
> > }
>
> > Hover says :
> > "Attempt to use Symobol failed" : SOMETHING
>
> > 1. Are unable to be folded
> > 2. Are not shown in the Outline <- This is especially bad.
>
> > Any pobibility to make the SOMETHING work with fold + outline ?
>
> > Thanks , Sascha
>
> The Problem is only if the typdef int SOMETHING; is in another File
> The file is referenced by an header hirachy.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04115 seconds