[omniORB] #pragma working on windows?
Sai-Lai Lo
S.Lo@uk.research.att.com
04 Apr 2000 17:54:10 +0100
Devin,
I run your sample through 2.7.1 and the output is fine, i.e. the repository
id is what one expected "IDL:com.visonael/testme/a".
omniORB never prepends "omg.org" unless it is told to do so by a prefix
"omg.org" pragma.
My guess is that your original IDL has included some CORBA services IDL
which would have the pragma defined and you do not reset the prefix by
#pragma prefix "com.visionael"
after the include.
You can see omniidl2 is doing the right thing if you look into the
xDynSK.cpp file. The repository IDs are all there.
Sai-Lai
>>>>> Devin Venable writes:
> 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
--
Sai-Lai Lo S.Lo@uk.research.att.com
AT&T Laboratories Cambridge WWW: http://www.uk.research.att.com
24a Trumpington Street Tel: +44 1223 343000
Cambridge CB2 1QA Fax: +44 1223 313542
ENGLAND