[omniORB] MSVC 6.0

Renzo Tomaselli renzo.tomaselli@tecnotp.it
Wed, 22 Sep 1999 12:26:21 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_013C_01BF04F5.AD71FAD0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Hi all,
        I wonder if anybody tried to port OmniORB2 *applications* from =
MSVC 5.0 to 6.0; all messages on this list refer almost to 5.0. Well, I =
tried with a few bad surprises. I wrote a number of dlls based on =
OmniORB 2.6 and MSVC 5.0; they used to run fine for almost one year. Now =
I moved all to 2.71 and MSVC 6.0. A simple code line such as:

static const CORBA::TypeCode_ptr Tp =3D Foo::_tc_Block;

doesn't work anymore, it compiles ok but the run fails. OmniORB is ok =
here, but it seems MSVC changed initialization order so Tp is always =
null, while it was ok with 5.0. It appears that the _tc_Block =
constructor in fooDynSK.cpp is called *after* Tp is initialized. This =
trouble occurs only across namespaces when different files are involved =
(actually, my foo_i.cpp and fooDynSK.cpp; if the overall code sequence =
is put into the same source file, it works fine).
A workaround might be replacing the line through "const =
CORBA::TypeCode_ptr & Tp =3D Foo::_tc_Block;" .
Then a minor point in CORBA_sysdep.h: the test for const data member =
initialization (_init_in_cldecl_ etc.) fails since _MSC_VER now is 1200 =
and nothing changed from 5.0 about this concern. This affects stubs from =
idls containing interfaces with embedded constants; they don't compile =
anymore with 6.0.
Thanks,
                                             Renzo Tomaselli     =20
-------------------------------------------------------------------------=
--
TecnoTP s.n.c. Special Information System Design
Maso Pelauchi I38050 Ronchi Valsugana,  Trento TN  ITALY
Tel. +39 0461 773164      Fax. +39 0461 771514
e-mail: renzo.tomaselli@tecnotp.it =20
-------------------------------------------------------------------------=
--

------=_NextPart_000_013C_01BF04F5.AD71FAD0
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dwindows-1252" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi all,</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; I wonder if =
anybody=20
tried to port OmniORB2 *applications* from MSVC 5.0 to 6.0; all messages =
on this=20
list refer almost to 5.0. Well, I tried with a few bad surprises. I =
wrote a=20
number of dlls based on OmniORB 2.6 and MSVC 5.0; they used to run fine =
for=20
almost one year. Now I moved all to 2.71 and MSVC 6.0. A simple code =
line such=20
as:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>static const CORBA::TypeCode_ptr Tp =3D=20
Foo::_tc_Block;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>doesn't work anymore, it compiles ok but the run =
fails.=20
OmniORB is ok here, but it seems MSVC changed initialization order so Tp =
is=20
always null, while it was ok with 5.0. It appears that the _tc_Block =
constructor=20
in fooDynSK.cpp is called *after* Tp is initialized. This trouble occurs =
only=20
across namespaces when different files are involved (actually, my =
foo_i.cpp and=20
fooDynSK.cpp; if the overall code sequence is put into the same source =
file, it=20
works fine).</FONT></DIV>
<DIV><FONT size=3D2>A workaround might be replacing the line through =
"const=20
CORBA::TypeCode_ptr&nbsp;&amp; Tp =3D Foo::_tc_Block;" .</FONT></DIV>
<DIV><FONT size=3D2>Then a minor point in CORBA_sysdep.h: the test for =
const data=20
member initialization (_init_in_cldecl_ etc.) fails since _MSC_VER now =
is 1200=20
and nothing changed from 5.0 about this concern. This affects stubs from =
idls=20
containing interfaces with embedded constants; they don't compile =
anymore with=20
6.0.</FONT></DIV>
<DIV><FONT size=3D2>Thanks,</FONT></DIV>
<DIV><FONT=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Renzo Tomaselli&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>---------------------------------------------------------------------=
------<BR>TecnoTP=20
s.n.c. Special Information System Design<BR>Maso Pelauchi I38050 Ronchi=20
Valsugana,&nbsp; Trento TN&nbsp; ITALY<BR>Tel. +39 0461=20
773164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax. +39 0461 771514<BR>e-mail: <A=20
href=3D"mailto:renzo.tomaselli@tecnotp.it">renzo.tomaselli@tecnotp.it</A>=
&nbsp;&nbsp;<BR>---------------------------------------------------------=
------------------</FONT></DIV></BODY></HTML>

------=_NextPart_000_013C_01BF04F5.AD71FAD0--