[omniORB] #pragma working on windows?

Devin Venable devin.venable@visionael.com
Tue, 4 Apr 2000 10:53:34 -0500


We are using the 2.7.1 distribution on windows NT 4.0.

I'm getting unexpected results using #pragma prefix in my IDL files.

The following IDL does not produce a #define statement in my generated .h
stub.  (Shouldn't it?)

#pragma prefix "com.visionael"
module testme
{
	struct a
	{
		long ab;
		long z;
	};
};

I came across this problem when trying to unpack a structure from an Any
that had originated in a JAVA program.  When comparing the repository IDs I
found the discrepancy.  The Omni IDL generated version was missing the
prefix while the idlToJava had the correct prefix.

Pragma statement in IDL file:
#pragma prefix "com.visionael"

Result using omniild2.exe:
"IDL:omg.org/LV/Composite:1.0"

Should read:
"IDL:com.visionael/LV/Composite:1.0"

On a side note, my prefix did not include "omg.org" (though it should have),
but it found it's way into the ID nonetheless.  I'm guessing that Omni now
automatically prepends "omg.org" regardless of if it is explicitly stated in
a #pragma.

Thanks

Devin Venable
VISIONAEL Corporation
dvenable@visionael.com