[omniORB] compiling omniORB3 on NT

Ji-Yong D. Chung virtualcyber@erols.com
Sun, 17 Oct 1999 10:13:03 -0400


    Continuing the compiling of omniORB3 on NT ...

    I was looking at the files, and it seems that undefining _core_attr m=
ay
cause problems.

    The files which should export the variables are in (I think) orbcore.
Since dynamic
is importing variables, it must declare dllimport (which gets erased by
undefining
_core_attr).  Similarly for all other libraries that are importing from
orbcore.

    The reason the errors are appearing, as I am guessing, is that, in th=
e
dynamic,
_core_attr (which is tranlsated to dllimpot) is being used together with =
a
definition.  The
CORBA.h seems to try to initialize a variable.

    For example, if you look at the line that was the cause of the first
error message:

 _CORBA_MODULE_VARINT _core_attr const ULong
       OMGVMCID _init_in_decl_(  =3D 1330446336 );

_init_in_decl is apparently trying to initialize a variable, and this is =
not
allowed to be used
with _core_attr.




----- Original Message -----
From: Lutz Bichler <bichler@unique-bremen.de>
To: Ji-Yong D. Chung <virtualcyber@erols.com>;
<omniorb-list@uk.research.att.com>
Sent: Tuesday, October 12, 1999 4:26 AM
Subject: Re: [omniORB] compiling omniORB3 on NT


>
> ----- Original Message -----
> From: Ji-Yong D. Chung <virtualcyber@erols.com>
> To: <omniorb-list@uk.research.att.com>
> Sent: Wednesday, October 13, 1999 6:43 PM
> Subject: [omniORB] compiling omniORB3 on NT
>
>
> >     This time, I compiled up to, but not including:
> >
> >     <top>/src/lib/omniORB2/dynamic/sharedlib
> >
> >
> >     The compiler says:
> >
> >
> >
>
../../../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -MD -GX -DNTArchi=
tec
> >
>
ture   -I./.. -I./../.. -I./../../.. -DUSE_omniORB_logStream -D_OMNIORB_D=
YNA
> >
>
MIC_LIBRARY -I.  -I../../../../../include -D__WIN32__ -D__x86__ -D__NT__ =
-D_
> > _OSVERSION__=3D4 -Foany.o ../any.cc
> > any.cc
> > ..\..\..\..\..\include\omniORB3/CORBA.h(796) : error C2201: 'OMGVMCID=
' :
> > must have external linkage in order to be exported/imported
> > ..\..\..\..\..\include\omniORB3/poa.h(265) : error C2201:
> 'THREAD_POLICY_ID'
> > : must have external linkage in order to be exported/imported
> >
> > and more error messages.
> >
> >
> >     Strangely, I did not get these errors when I compiled orbcore, ev=
en
> > though files in orbcore still refers to OMGVMCID, THREAD_POLICY_ID, a=
nd
> > other variables.
> >
> >     This appears to be the last hurdle for compiling /src -- any
> quick/easy
> > tip on this?  Anyone?
> >
> >
> >
> >
>
> Hi,
>
> it is OK that you do not get the error messages when compiling orbcore
> because
> of the "_core_attr" definition in the beginning of CORBA.h. I got rid o=
f
the
> errors
> while compiling by undefining "_core_attr"  when compiling "dynamic", b=
ut
> wasn=B4t
> able to start the poa example dynamically linked because of an
initilization
> error
> in omniDynamic300_rtd.dll. So this "solution" seems to help only while
> compiling ;-(
>
> Cheers,
> Lutz
>
>