Board index » cppbuilder » IDL compilation

IDL compilation

I am trying to compile an IDL(CORBA interface) file with the following
simple syntax that should work:
module Interface1
{
    typedef unsigned long Time;
    typedef unsigned long Date;
    enum DayOfWeek{e_sunday, e_monday.....};

    struct DateTime
    {
        Date date;
        Time time;
        DayOfWeek day
    };

Quote
}

Whenever I use a typedef or enum inside of another data type I am defining,
the compiler is giving me an error message saying that I am trying to
redefine the type.  I am getting this error when using a published IDL.
Does anyone have any ideas or what could be the cause.

Thanks,
Jason Castillo

 

Re:IDL compilation


Have you tried changing your type names to something that will does not exist
for sure like "typedef unsigned long Date12345" because Date() and Time() are
vcl functions because that could be the problem.
--
 - Lev B.
 - AKA BoneMan of the JawBones Network

Re:IDL compilation


Yes, I should have clarified that in the original post.  The problem exists
if the IDL is as simple as:

typedef unsigned long BoneMan;
struct JawBones
{
    BoneMan boneMan;

Quote
}

Interestingly, it seems to work if I typedef a string, but will fail on
other types.  The exact error message is
'attempt to redefine BoneMan which in this scope refers to the definition on
line x'

Jason Castillo

Quote
"Lev B." <jawbo...@jawbones.net> wrote in message

news:3B561B7D.714D30B6@jawbones.net...
Quote
> Have you tried changing your type names to something that will does not
exist
> for sure like "typedef unsigned long Date12345" because Date() and Time()
are
> vcl functions because that could be the problem.
> --
>  - Lev B.
>  - AKA BoneMan of the JawBones Network

Re:IDL compilation


Ahhh, a solution that I'm sure others can use.  Starting with Visibroker 4,
the IDL compiler is now case insensitive(yuk!).  Time to think up a new
naming convention.

Jason Castillo

Quote
"Jason Castillo" <jwcasti...@hotmail.com> wrote in message

news:3b57067c$1_1@dnews...
Quote
> Yes, I should have clarified that in the original post.  The problem
exists
> if the IDL is as simple as:

> typedef unsigned long BoneMan;
> struct JawBones
> {
>     BoneMan boneMan;
> }
> Interestingly, it seems to work if I typedef a string, but will fail on
> other types.  The exact error message is
> 'attempt to redefine BoneMan which in this scope refers to the definition
on
> line x'

> Jason Castillo

> "Lev B." <jawbo...@jawbones.net> wrote in message
> news:3B561B7D.714D30B6@jawbones.net...
> > Have you tried changing your type names to something that will does not
> exist
> > for sure like "typedef unsigned long Date12345" because Date() and
Time()
> are
> > vcl functions because that could be the problem.
> > --
> >  - Lev B.
> >  - AKA BoneMan of the JawBones Network

Re:IDL compilation


You are kidding me?!! That goes agains everything we, c++ programers
stand for!
--
 - Lev B.
 - AKA BoneMan of the JawBones Network

Other Threads