Discussion:
[omniORB] Having trouble with CORBA::Object::_PD_repoId
Raikanta Sahu
2007-12-17 23:09:19 UTC
Permalink
I am having problem with the client side of my application when I use the
function CORBA::ORB::string_to_object. The problem seems to be that
::CORBA::Object::_PD_repoId is not resolved/initialized properly when the
DLL is loaded.

omniORB version: 4.1.1
platform: Windows XP, vc7, linked with *_rt.dll

When I try to examine the value of CORBA::Object::_PD_repoId while
examining the stack, I get the following message.
? ::CORBA::Object::_PD_repoId
CXX0017: Error: symbol "::CORBA::Object::_PD_repoId" not found
The function where this occurs looks like:

void*
_objref_ORB_ProEShell::_ptrToObjRef(const char* id)
{
if( id == ::ORB_ProEShell::_PD_repoId )
return (::ORB_ProEShell_ptr) this;
if( id == ::ORB_ProEApp::_PD_repoId )
return (::ORB_ProEApp_ptr) this;


if( id == ::CORBA::Object::_PD_repoId )
return (::CORBA::Object_ptr) this;

if( omni::strMatch(id, ::ORB_ProEShell::_PD_repoId) )
return (::ORB_ProEShell_ptr) this;
if( omni::strMatch(id, ::ORB_ProEApp::_PD_repoId)
)
return (::ORB_ProEApp_ptr) this;


if( omni::strMatch(id,
::CORBA::Object::_PD_repoId) )
return (::CORBA::Object_ptr) this;

return 0;
}

The exception occurs in the fuction omni::strMatch. In that function, the
pointers are derefernced. Since the second argument passed to omni:strMatch
is not defined, it is understandable why the exception occurs.

When I looked at the declaration of ::CORBA::Object::_PD_repoId, in
CORBA_ORB.h, it looks like:

static _core_attr const char* _PD_repoId;

I imagine _core_attr is expected to translate to something like "dllexport"
when building the omniORB library(ies), and to "dllimport" when building
applications. I suspect that translation to "dllexport" does not happen
when building the omniORB libraries.

Has anybody encountered this problem before? Is there a workaround or a fix
for the problem?
--
+------------------------------------------+--------------------------+
| Raikanta Sahu | phone: (505) 323-2525 |
| ***@cometsolutions.com | FAX: (505) 292-5191 |
+------------------------------------------+--------------------------+
Duncan Grisby
2007-12-21 17:44:53 UTC
Permalink
Post by Raikanta Sahu
I am having problem with the client side of my application when I use the
function CORBA::ORB::string_to_object. The problem seems to be that
::CORBA::Object::_PD_repoId is not resolved/initialized properly when the
DLL is loaded.
omniORB version: 4.1.1
platform: Windows XP, vc7, linked with *_rt.dll
It will be some kind of DLL linkage issue.

How did you build omniORB (or are you using the binary release)? How
are you building your code? Try the omniORB echo examples using the
included makefiles. Do they work? Assuming they do, compare the
compiler options they use with the options you are using.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Raikanta Sahu
2007-12-23 05:39:44 UTC
Permalink
Post by Duncan Grisby
Post by Raikanta Sahu
I am having problem with the client side of my application when I use the
function CORBA::ORB::string_to_object. The problem seems to be that
::CORBA::Object::_PD_repoId is not resolved/initialized properly when the
DLL is loaded.
omniORB version: 4.1.1
platform: Windows XP, vc7, linked with *_rt.dll
It will be some kind of DLL linkage issue.
How did you build omniORB (or are you using the binary release)? How
are you building your code? Try the omniORB echo examples using the
included makefiles. Do they work? Assuming they do, compare the
compiler options they use with the options you are using.
Duncan,

Thanks for your response.

I am using the binary release. I tried building the omniORB examples, but
was not successful.

I will look into the compiler options in the makefiles and see if anything
from there helps.
Post by Duncan Grisby
Cheers,
Duncan.
--
-- Duncan Grisby --
-- http://www.grisby.org --
--
+------------------------------------------+--------------------------+
| Raikanta Sahu | phone: (505) 323-2525 |
| ***@cometsolutions.com | FAX: (505) 292-5191 |
+------------------------------------------+--------------------------+
Loading...