[omniORB] Extracting object reference from any directly

Steven W. Brenneis brennes1@rjrt.com
Fri, 23 Jun 2000 09:00:30 -0400


It looks like you have not included the dynamic stub in your project. For any
IDL:

MyInterface.idl

You will get:

MyInterfaceSK.cpp and MyInterface.hh

When you use the -a switch, you will also get:

MyInterfaceDynSK.cpp

You need to include this source file in your project.

"A$EC<v" wrote:

> Hi,all
>
> CORBA::Any aAny = msg->getData();
> SECSList_ptr list;
> aAny >>= list;
>
> When I used >>= operator to extract object reference
> from any, I've encountered the following error.
> Of course, I compiled IDL file with -a flag.
> (Visual C++, omniORB2.80)
>
> client.obj :
>  error LNK2001:
>  unresolved external symbol   <--
>  "bool __cdecl operator>>=(class CORBA::Any const &,class driver::SECSList
*
> &)" (??_2@YA_NABVAny@CORBA@@AAPAVSECSList@driver@@@Z)
>
> Debug/client.exe : fatal error LNK1120: 1 unresolved externals
>
> But, there is no problem
> when I modified the code like this.
>
> CORBA::Any aAny = msg->getData();
> CORBA::Object_ptr obj;
> SECSList_ptr list;
> aAny >>= CORBA::Any::to_object(obj);
> list = SECSList::_narrow(obj);
>
> So, whenever I want to get a object reference from any
> must I get a generic reference first and cast it?
> Are there any methods to get object reference directly?
>
> Please advise...
>
> Taek-su,
> Sejong Telecom Inc.
> Seoul,
> Korea.
> ==================================================
> No. 1 ?l8. @NEM3], Daum
> Fr;} >24B 9+7a E-mail AV<R GQ8^@O3]
> Av18CL GQ1[ 0K;v<-:q=: Daum FIREBALL
> http://www.daum.net

--
Steven W. Brenneis
Senior Programmer/Analyst
R.J. Reynolds Tobacco Co.

~!~$~%~
Do not meddle in the affairs of dragons, for you are crunchy and taste good
with
ketchup.