Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » typdef Problems
typdef Problems [message #131537] Tue, 14 December 2004 07:23 Go to next message
Eclipse UserFriend
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
more: typdef Problems [message #131555 is a reply to message #131537] Tue, 14 December 2004 08:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: an.nym.us

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.
Re: typdef Problems [message #131566 is a reply to message #131537] Tue, 14 December 2004 08:07 Go to previous messageGo to next message
Eclipse UserFriend
typedef int SOMETHING;

SOMETHING function ()
{
return 1;
}

works for me.

Do you have any syntax error ?

CC Vural



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
Re: typdef Problems [message #131579 is a reply to message #131555] Tue, 14 December 2004 08:55 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:Codeguard-Output(malloc, calloc)
Next Topic:Mapping CDT2.1 RC releases to Bug-fixes?
Goto Forum:
  


Current Time: Sun Jun 01 01:20:19 EDT 2025

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

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

Back to the top