Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IDL compiler is complaining about my circular structure reference

Status
Not open for further replies.

energie

Programmer
Jul 8, 2003
3
CA
here's a snipplet of what i want to specify in my IDL:

typedef struct prop
{
wstring name
propCollection childProps;
} structA_TYPE;

typedef struct propCollection
{
sequence<prop> nProperties;
} propCollection_TYPE;

my C++ idl compiler is complaining that

propCollection childProps;

in the &quot;prop struct&quot; to be undefined. If i move the &quot;propCollection struct&quot; to be above the &quot;prop struct&quot; defination, the opposite will happen.

is there anyway to get around this?
 
You forgot about forward declarations

struct propCollection;
typedef struct prop
{
wstring name
propCollection childProps;
} structA_TYPE;

typedef struct propCollection
{
sequence<prop> nProperties;
} propCollection_TYPE;

Ion Filipski
1c.bmp


filipski@excite.com
 
thanks for your reply

I wish it was that easy tho.

the c++ idl comipler that im using complains about forward declaration on structures. I've looked into and it seems like they only support forward declaration on interfaces.

Is that the case?

 
It is about forward declarations. CORBA IDL is based on C++.

Ion Filipski
1c.bmp


filipski@excite.com
 
CORBA IDL does NOT support forward declaration on structures. It says so in many many books as well as my compiler.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top