-----Original Message-----
From: owner-3dgames(at)Softimage.COM
[mailto:owner-3dgames(at)Softimage.COM]On Behalf Of Christian
Beaumont
Sent: Sunday, December 11, 2005 3:53 AM
To:
3DGames(at)Softimage.COM
Subject: Re: XSI Cpp SDK Linker errors with
VS2005
If I remember rightly the problem is in the way wide character strings
are handled. My memory might be a bit vague as this was a while
ago...
The XSI libs were built without the compiler conformance switch
/Zc::wchar_t to enable wchar_t as a built-in type. This means the
signature for a wide string parameter looks like "unsigned short const *"
rather than "wchar_t const *"
Unfortunately the way the function signatures get mangled for functions
that use wchar_t as a built-in type are different from how they look
without the conformance switch which is why you are getting your linker
errors.
The Microsoft guys obviously had the same problem and devised a
workaround. For example if you do a dumpbin on some of the MFC and ATL
libs you will notice that for every exported C++ function that uses wide
strings there is now an additional COFF alias records for the wchar_t
conformant version.
I wish there was a magic bullet but I couldn't find one. We solved
the issue by writing a tool to add additional alias records to the XSI libs to
give us the wchar_t conformant symbols and I think I changed the header
files as well to specify wchar_t in the xsi_string.h. I can't
tell for sure because we lost our source control history when we switched to
subversion and I don't have the prior history around.
One point to note is that this is not just an issue for the XSI
libs. You'll run into this problem for any external lib that uses wide
strings if it wasn't compiled with conformant wchar_t but your app uses
conformant wchar_t.
If you drop me a personal note I'd be happy to provide you with the tool
I wrote.
Christian
On 12/10/05, Wessam
Bahnassi <wbahnassi(at)inframez.com>
wrote:
Greetings
all,
Anybody managed to use the XSI CPP SDK with the new Visual
Studio 2005
compiler? I keep getting a linker error for some XSI::CString
functions
(ctor and == operator for example)...
Thanks,
Wessam
Bahnassi
Microsoft DirectX MVP,
Lead
Programmer
In|Framez
--
In|Structurez Arabic Gamedev
Community
www.instructurez.com
---
Unsubscribe?
Mail Majordomo(at)Softimage.COM
with the following text in body:
unsubscribe
3dgames