Board index » delphi » help with typedef error

help with typedef error

I am using a third party lib and can not get the headers to compile because
of this

typedef enum _file_request {
    FRA,
    FRB,
    FRC,
    FRD = -1

Quote
} _file_request;

typedef NetEnum(_file_request) file_request;

the compiler shows an error " , expected" on the last line.
and "earlier definition of _file_request"

I have tried renaming the instance variable after the typedef enum. It still
doesn't want to compile.
Any help would be greatly appreciated.

 

Re:help with typedef error


Quote
On Fri, 08 Feb 2002 18:30:12 +0100, Danny Brown wrote:
> typedef enum _file_request {
>     FRA,
>     FRB,
>     FRC,
>     FRD = -1
> } _file_request;
> typedef NetEnum(_file_request) file_request;

What are you trying to declare/define on the last line?

Re:help with typedef error


Quote
"Thomas Maeder" <mae...@glue.ch> wrote in message news:3c642790$1_2@dnews...
>snip
> > typedef NetEnum(_file_request) file_request;

> What are you trying to declare/define on the last line?

I am using someone else's headers so I am not exactly sure what they are
trying to do. I've gotton past this part though. It turns out that the
NetEnum is also a typedef. Which contains typedefs. It's a real mess. I have
had to start tracing through multiple header files to find out what is going
on. Thanks for your reply. I don't think anyone can help with this its going
to just take a bunch of digging.
Thanks Again.

Re:help with typedef error


In 'borland.public.cpp.borlandcpp', "Danny Brown" <nos...@nospam.com>
wrote in news:3c640b41$2_2@dnews:

Quote
> I am using a third party lib and can not get the headers to compile
> because of this

> typedef enum _file_request {
>     FRA,
>     FRB,
>     FRC,
>     FRD = -1
> } _file_request;

This is correct.

Quote
> typedef NetEnum(_file_request) file_request;

This is not C.

Are you sure that this was in the original header?

Quote
> the compiler shows an error " , expected" on the last line.
> and "earlier definition of _file_request"

> I have tried renaming the instance variable after the typedef enum. It
> still doesn't want to compile.
> Any help would be greatly appreciated.

Contact your vendor?

--
-ed- emdel at noos.fr
The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
C-library: http://www.dinkumware.com/htm_cl/index.html
FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/

Re:help with typedef error


On Fri, 8 Feb 2002 11:30:12 -0600, "Danny Brown" <nos...@nospam.com>
wrote:

Quote
> I am using a third party lib and can not get the headers to compile because
> of this

> typedef enum _file_request {
>     FRA,
>     FRB,
>     FRC,
>     FRD = -1
> } _file_request;
> typedef NetEnum(_file_request) file_request;

> the compiler shows an error " , expected" on the last line.
> and "earlier definition of _file_request"

> I have tried renaming the instance variable after the typedef enum. It still
> doesn't want to compile.
> Any help would be greatly appreciated.

Show us the definition of

        NetEnum

from the header file.

Regards
Horst

Other Threads