[omniORB] #include in .IDL file works incorrectly!!!

David Riddoch djr@orl.co.uk
Tue, 19 Jan 1999 17:45:25 +0000 (GMT)


David,

The IDL compiler treats #includes in a special way because it assumes that
what you are including will be IDL, and also that you will compile this
IDL separately.

If you want #includes to work the way you expect them to then you could
try running the C pre-processor over your IDL file separately. You will
then need to remove the information that the C pre-processor adds before
running it through the IDL compiler. The C pre-processor adds lines that
start with a # and contain info about what file and line number it is
currently at.

The advantage of this approach is that the IDL compiler will see a single
pure IDL file, and will define your structure in C++ for you. All you have
to do is write a script to automate it!

I hope this solution works for you.

Cheers,
David