[omniORB] VS 2005 - OmniOrb 4.1.4 Linker Issue

jklein at rockwellcollins.com jklein at rockwellcollins.com
Thu Apr 22 18:31:55 BST 2010


Howdy,

I'm trying to build an application that is a mix between managed and 
unmanaged C++ with Visual Studio 2005 and omniOrb 4.1.4. This has been a 
trying task to say the least. Of course, all the CORBA stuff is done 
within non-managed code.

I'm down to a few linker warnings (I only list two as all the other are 
duplicates). The application seems to run when I run it on the machine I 
compiled it on within visual studio, but when I move it to another 
machine, it crashes instantly. I don't even insatiate any of the 
non-managed code unless a user clicks a button. Also, I'm moved all the 
DLLs to the other machine.

I'm assuming this is due to these linker warnings.

Removed.obj : warning LNK4248: unresolved typeref token (0100001C) for 
'CORBA._objref_IDLType'; image may not run
Removed.obj : warning LNK4248: unresolved typeref token (01000017) for 
'omniIdentity'; image may not run

I translate my IDL with the following:

omniidl -bcxx -Wba -Wbh=.h -Wbs=.cpp -Wbd=.cpp

PreProcessor flags

WIN32;_DEBUG;__WIN32__;__x86__;_WIN32_WINNT=0x0400;__NT__;__OSVERSION__=4;_CRT_SECURE_NO_WARNINGS

Or better this:

/Od /I "C:\snapshots\..Removed.." /I 
"C:\omniorb\omniORB-4.1.4\include\omniORB4" /I "C:\snapshots\..Removed.." 
/I "C:\omniorb\omniORB-4.1.4\include" /D "WIN32" /D "_DEBUG" /D 
"__WIN32__" /D "__x86__" /D "_WIN32_WINNT=0x0400" /D "__NT__" /D 
"__OSVERSION__=4" /D "_CRT_SECURE_NO_WARNINGS" /D "_UNICODE" /D "UNICODE" 
/FD /EHa /MDd /Yu"stdafx.h" /Fp"Debug\..Removed...pch" /Fo"Debug\\" 
/Fd"Debug\vc80.pdb" /W3 /nologo /c /Zi /clr /TP /errorReport:prompt /FU 
"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /FU 
"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" /FU 
"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll" /FU 
"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll" 
/FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll"

Linked Libs

ws2_32.lib mswsock.lib advapi32.lib omniORB414_rtd.lib 
omniDynamic414_rtd.lib omnithread34_rtd.lib

Or better this:

/OUT:"C:\snapshots\..Removed...exe" /INCREMENTAL /NOLOGO 
/LIBPATH:"C:\omniOrb\omniORB-4.1.4\lib\x86_win32" /MANIFEST 
/MANIFESTFILE:"Debug\..Removed...exe.intermediate.manifest" /DEBUG 
/ASSEMBLYDEBUG /PDB:"c:\snapshots\..Removed...pdb" /SUBSYSTEM:WINDOWS 
/ENTRY:"main" /MACHINE:X86 /FIXED:No /ERRORREPORT:PROMPT ws2_32.lib 
mswsock.lib advapi32.lib omniORB414_rtd.lib omniDynamic414_rtd.lib 
omnithread34_rtd.lib


I thought about static linking, but that is not an option with the /clr 
option.

I've heard others mention similar things, but none have been answered. 

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20100422/1ff64297/attachment.htm


More information about the omniORB-list mailing list