Problem with Compiler patch 111715-18
Hi,
I am working on Solaris 5.8 with Forte Developer 7 C++ compiler 5.4. I am using RWDate, RWTime in my application code. This meant that I had to apply the new compiler patch 111715-18 for DST.
The moment I apply the patch, it starts giving me compilation error in Corba code.
To confirm this, I built a small program and its is also resulting in error. Also its not any code which is being writtern by me or any other developer. Its a boiler plate code which corba's idl/idlgen automatically generates.
Following is what I did:
1) Created an idl file. interface Hello { string getGreeting; }
2) generated C++ code for this interface.
idl -base:-cC.C -poa:-sS.C hello.idl
3) This generates following files.
hello.hh
helloS.hh
helloC.C
helloS.C
4)Compile both .C files :
CC -c -I/opt/app/iona/asp6/asp/6.0/include -g +p -mt -D_REENTRANT helloC.C
CC -c -I/opt/app/iona/asp6/asp/6.0/include -g +p -mt -D_REENTRANT helloS.C
5) Build the static library
CC -xar -o libHello.a helloC.o helloS.o
This builds perfectly well without the patch.
The moment patch is applied I get following error:
CC -c -I/opt/app/iona/asp6/asp/6.0/include -g +p -mt -D_REENTRANT helloC.C
"helloC.C", line 166: Error: Cannot cast from IT_Cxx_ObjRef_var<CORBA::Object*, CORBA::Object, IT_Cxx_IntfAlloc><CORBA::Object*, CORBA::Object>> to CORBA::Object*.
1 Error(s) detected.
CC -c -I/opt/app/iona/asp6/asp/6.0/include -g +p -mt -D_REENTRANT helloS.C
"helloS.C", line 19: Error: Could not find a match for IT_Gen_DynamicProxy_Hello::IT_Gen_DynamicProxy_Hello().
1 Error(s) detected.
Following is the code snippet of helloC.C which results in error:
CORBA::Object_var obj = orb->it_demarshal_object(is);
CORBA::release(*m_ptr);
*m_ptr = Hello::_unchecked_narrow(obj); //This line results in error
Following is the code snippet of hellS.C :
CORBA::Object_var proxy = _this_impl(_tc_Hello->id());
return new IT_Gen_DynamicProxy_Hello(proxy); //This line results in error.
It seems like a problem with patch. Or do I need to do something else to build it properly with the new patch.
Thanks
Anshuman

