[omniORB] OmniOrb incompatible with Boost library
David Bertrand
David.Bertrand at amberfin.com
Wed Jun 4 13:07:56 BST 2008
Hi,
Background
MSVC7 libraries compiled with -Zc:wchar_t switch (Treat wchar_t as
Built-in Type) are incompatible with the ones compiled without. This
basically changes the compiler interpretation of wchar_t from unsigned
short to a native wchar_t. Everything go fine until you link to unicode
functions. Since it's a global compile setting, your application cannot
mix and match libraries compiled with different setting : it will give
you link errors.
Boost v1.35 library uses the -Zc:wchar_t switch, and OmniOrb do not use
it. Since MSVC8 activates the -Zc:wchar_t switch by default, I feel it
confirms Boost is right. For testing purposes, I added the switch to
current release.
Here are the changes required for omniorb-4.1.2 :
\mk\platforms\x86_win32_vs_7.mk line 31
Enables "Treat wchar_t as Built-in Type" (-Zc:wchar_t).
MSVC_DLL_CXXNODEBUGFLAGS = -MD -EHs -GS -GR -Zi -nologo
-Zc:wchar_t
MSVC_DLL_CXXLINKNODEBUGOPTIONS = -nologo -DEBUG
MSVC_DLL_CNODEBUGFLAGS = -MD -GS -GR -Zi -nologo -Zc:wchar_t
MSVC_DLL_CLINKNODEBUGOPTIONS = -nologo -DEBUG
#
MSVC_DLL_CXXDEBUGFLAGS = -MDd -EHs -RTC1 -GS -GR -Zi -nologo
-Zc:wchar_t
MSVC_DLL_CXXLINKDEBUGOPTIONS = -nologo -DEBUG
MSVC_DLL_CDEBUGFLAGS = -MDd -RTC1 -GS -GR -Zi -nologo
-Zc:wchar_t
MSVC_DLL_CLINKDEBUGOPTIONS = -nologo -DEBUG
#
# Or
#
# Use the following set of flags to build and use multithread static
libraries
#
MSVC_STATICLIB_CXXNODEBUGFLAGS = -MT -EHs -GS -GR -Zi -nologo
-Zc:wchar_t
MSVC_STATICLIB_CXXLINKNODEBUGOPTIONS = -nologo -DEBUG
MSVC_STATICLIB_CNODEBUGFLAGS = -MT -GS -GR -Zi -nologo
-Zc:wchar_t
MSVC_STATICLIB_CLINKNODEBUGOPTIONS = -nologo -DEBUG
MSVC_STATICLIB_CXXDEBUGFLAGS = -MTd -EHs -RTC1 -GS -GR -Zi
-nologo -Zc:wchar_t
MSVC_STATICLIB_CXXLINKDEBUGOPTIONS = -nologo -DEBUG
MSVC_STATICLIB_CDEBUGFLAGS = -MTd -RTC1 -GS -GR -Zi -nologo
-Zc:wchar_t
MSVC_STATICLIB_CLINKDEBUGOPTIONS = -nologo -DEBUG
My version compiled with this change linked and ran fine.
Feel free to comment.
Thanks,
David
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080604/85da6dd3/attachment.htm
More information about the omniORB-list
mailing list