You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Joerg Toellner <to...@oss-gmbh.de> on 2005/09/14 10:44:54 UTC

Linking with static library - Linking errors and unresolved external

Hi Xerces-Group,

I'm using:
MS Visual Studio .NET 7.1 Enterprise Architext
Xerces-C V 2.7.0 (build from source myself with the a.m. compiler)
Windows XP Pro

I really appreciate the new project, that compiles a static library of
xerces-c with MSVC 7.1.

I compiled xerces-all solution and get all expected resultfiles
(Debug/Release .DLL and Debug/Release .lib).

I have a own project that uses Xerces. Up to now i used the DLL-Version. But
i really would appreciate to get rid of the external DLL-Files and get
Xerces statically compiled into my app.

When i compile my app against xerces-c_2D.lib (or the release dll-variant),
my project compiles with 0 errors 0 warnings and all is fine and working.

When i change the library to xerces-c_static_2D.lib (or the release
static-variant) in the project settings and compile again, i get the
attached warnings and errors (see below).

I searched the mailinglist-archive and found some advice and tried them. But
with no success. I checked my build logs from my xerces-build and saw that
the macro XML_LIBRARY is defined in the static builds (which let the Macros
PLATFORM_IMPORT and PLATFORM_EXPORT resolve in empty ones instead of the
__cdecl variants - which is, as the advises said, correct).

I'm not very good in playing with compiler options. So i'm now stuck and
helpless. Would please anybody enlighten me a little bit so i'm able to link
the xerces-libraries statically in my app? What i have exactly to do (step
by step for lamers like me if possible) to get it to work?

TIA veeeery much for any hint
Joerg Toellner

Following my warnings and error messages:

---------------SNIP------------------------
Linking...
dmpmainFrm.obj : warning LNK4049: locally defined symbol
?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
(public: static class xercesc_2_7::MemoryManager *
xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported

xmldom.obj : warning LNK4049: locally defined symbol
?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
(public: static class xercesc_2_7::MemoryManager *
xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported

dmpmainFrm.obj : warning LNK4217: locally defined symbol
?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned short
* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported in
function "public: __thiscall XERCES_C2X::XERCES_C2X(char const * const)"
(??0XERCES_C2X@@QAE@QBD@Z)

xmldom.obj : warning LNK4049: locally defined symbol
?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned short
* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported

dmpmainFrm.obj : warning LNK4217: locally defined symbol
?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void __cdecl
xercesc_2_7::XMLString::release(unsigned short * *)) imported in function
"public: __thiscall XERCES_C2X::~XERCES_C2X(void)" (??1XERCES_C2X@@QAE@XZ)

xmldom.obj : warning LNK4049: locally defined symbol
?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void __cdecl
xercesc_2_7::XMLString::release(unsigned short * *)) imported

xmldom.obj : warning LNK4217: locally defined symbol
?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPAVDOMImpleme
ntation@2@PBG@Z (public: static class xercesc_2_7::DOMImplementation *
__cdecl
xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsigned short
const *)) imported in function "class xercesc_2_7::DOMImplementation *
__cdecl dom_Init(void)" (?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)

xmldom.obj : warning LNK4217: locally defined symbol
?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@2@QAVMemory
Manager@2@_N@Z (public: static void __cdecl
xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_2_7::PanicHandler * const,class
xercesc_2_7::MemoryManager * const,bool)) imported in function "class
xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)

xmldom.obj : warning LNK4049: locally defined symbol
?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static char const
* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported

xmldom.obj : warning LNK4217: locally defined symbol
?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static void __cdecl
xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in function "void
__cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)

xmldom.obj : warning LNK4217: locally defined symbol
?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char * __cdecl
xercesc_2_7::XMLString::transcode(unsigned short const * const)) imported in
function $L79627

xmldom.obj : warning LNK4217: locally defined symbol
?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void __cdecl
xercesc_2_7::XMLString::release(char * *)) imported in function $L79627

xmldom.obj : warning LNK4217: locally defined symbol
??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl
xercesc_2_7::XMemory::operator delete(void *)) imported in function $L79584

xmldom.obj : warning LNK4217: locally defined symbol
??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@Z (public:
__thiscall xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
const * const,class xercesc_2_7::MemoryManager * const)) imported in
function "void __cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation
*,class xercesc_2_7::DOMDocument *,char *)"
(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2@PAD@Z)

xmldom.obj : warning LNK4217: locally defined symbol
??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl
xercesc_2_7::XMemory::operator new(unsigned int)) imported in function "void
__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class
xercesc_2_7::DOMDocument *,char *)"
(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2@PAD@Z)

xmldom.obj : warning LNK4217: locally defined symbol
??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual __thiscall
xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void)) imported
in function "public: virtual void * __thiscall
xercesc_2_7::LocalFileFormatTarget::`scalar deleting destructor'(unsigned
int)" (??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)

xmldom.obj : warning LNK4217: locally defined symbol
?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned short const
* __thiscall xercesc_2_7::XMLException::getMessage(void)const ) imported in
function $L79627

Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: unresolved
external symbol ___mb_cur_max
.\Debug/dmpmain.exe : fatal error LNK1120: 1 unresolved externals

Build log was saved at "file://d:\EigeneDaten\Visual Studio
Projects\xml\dmpmain\Debug\BuildLog.htm"
dmpmain - 2 error(s), 17 warning(s)
---------------------- Done ----------------------

    Rebuild All: 0 succeeded, 1 failed, 0 skipped
---------------SNIP------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: AW: Linking with static library - Linking errors and unresolved external

Posted by Alberto Massari <am...@datadirect.com>.
Hi Joerg,

At 16.53 15/09/2005 +0200, Joerg Toellner wrote:
>Greetings Alberto,
>
>Thanks for your answer.
>UhOh! What a mess. :-(
>
>First:
>My "Ignore All Standard libraries" is set to NO. But i HAVE TO ignore the
>libcmtd.lib. If not i get a looooooooooot of errors and warnings. This has
>to do with the wxWidgets-Library. Ignoring the libcmtd gives me only the one
>error. So "don't ignoring the libcmtd.lib" is not an option i think.

I see that; but maybe this was something needed 
before I asked you to recompile wxWidgets using 
/MTd; have you tried removing libcmtd.lib from 
the ignored libraries after that moment, as both 
libraries should now agree on what is the C runtime library to use?


>Have i another chance to get around this. Im willing to define this
>mb_cur_max by myself at the moment only for my needs (Win32 only) if it is
>possible. Or is it a really bad idea? And if it will work, where have i to
>declare it and what value assign to it?

As a last resort, you could add this line

#define MB_CUR_MAX 1

at the beginning of Win32TransService.cpp, before all the #include statement.


>Second:
>My library search order in Tools->Options is exactly like the following:
>C:\sys\win      // Some own company libraries - Nothing that can conflict
>with Standard-ones
>D:\EigeneDaten\Visual Studio
>Projects\xml\xerces270\Build\Win32\VC7.1\StaticRelease
>D:\EigeneDaten\Visual Studio
>Projects\xml\xerces270\Build\Win32\VC7.1\StaticDebug
>D:\EigeneDaten\Visual Studio
>Projects\xml\xerces270\Build\Win32\VC7.1\Release
>D:\EigeneDaten\Visual Studio Projects\xml\xerces270\Build\Win32\VC7.1\Debug
>D:\EigeneDaten\Visual Studio Projects\wxWidgets\lib\vc_lib
>$(VCInstallDir)lib
>$(VCInstallDir)atlmfc\lib
>$(VCInstallDir)PlatformSDK\lib\prerelease
>$(VCInstallDir)PlatformSDK\lib
>$(FrameworkSDKDir)lib
>
>Do you see any "bad guy" in the list?

No, this looks a good list of directories.

>Hope to hear from you again

Well, I hope for you that this conversation will end, eventually ;-)

Ciao,
Alberto

>CU
>Joerg
>
>-----Ursprüngliche Nachricht-----
>Von: Alberto Massari [mailto:amassari@datadirect.com]
>Gesendet: Donnerstag, 15. September 2005 15:22
>An: c-dev@xerces.apache.org
>Betreff: Re: AW: AW: AW: Linking with static library - Linking errors and
>unresolved external
>
>Hi Joerg,
>I've tried reproducing that linker error, but I've never reached the point
>where just that entry point is reported as missing. The closest point I got
>to was when I disabled linking against libcmt.lib (either by specifying
>"Yes" to the setting Linker -> Input -> Ignore all default libraries, or by
>adding libcmt.lib to the setting Linker -> Input -> Ignore specific
>library), but in that case I got tons of errors, including the one for
>__mb_cur_max.
>So, can you check the value for those settings?
>If they are "No" and empty, can you check the list of directories containing
>library files (both at the project level Linker -> General -> Additional
>library directories, and at the environment level Tools | Options ->
>Projects ->
>VC++ Directories -> Show Directories for: Library
>files) to verify they don't include directories meant for other versions of
>the Visual C++ compiler.
>
>Alberto
>
>At 13.55 15/09/2005 +0200, Joerg Toellner wrote:
> >Hi Alberto,
> >
> >Sorry for bothering you again.
> >
> >I've now compiled wxWidgets with the /MT and /MTd (for Release and
> >Debugbuild) CodeOption and then compiled my app with this new wxLibs
> >and the static Xerces-lib with the /MT and /MTd.
> >
> >The wx-errors are now totally gone. The only error i receive is the
> >last one from Xerces like this:
> >
> >Linking...
> >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : fatal
> >error LNK1120: 1 unresolved externals
> >
> >What can i do to get rid of this very last error between me and the
> >solution? Maybe you have a trick/hack/WhatToDo for me?
> >
> >TIA (as is said so often :-)) )
> >Joerg
> >
> >
> >-----Ursprüngliche Nachricht-----
> >Von: Alberto Massari [mailto:amassari@datadirect.com]
> >Gesendet: Mittwoch, 14. September 2005 15:50
> >An: c-dev@xerces.apache.org
> >Betreff: Re: AW: AW: Linking with static library - Linking errors and
> >unresolved external
> >
> >Hi Joerg,
> >this is probably caused by the wxWidgets static library; the linker
> >that assembles your .exe from the two .lib files cannot handle both a
> >static and a dynamic import of the msvcrt library. Try rebuilding
> >wxWidgets with /MTd if you can, otherwise rebuild Xerces specifying
> >/MDd (clearly, Release builds should use /MT and /MD respectively)
> >
> >Alberto
> >
> >At 15.05 14/09/2005 +0200, Joerg Toellner wrote:
> > >Dear Alberto,
> > >
> > >Thx. again! You are so grateful with your time.
> > >
> > >I've done what you've said.
> > >
> > >But even if i change my runtime library setting as you said, i still
> > >get the Xerces unresolved external.
> > >
> > > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
> > >
> > >I checked double time if i really changed to MTd and MT correctly.
> > >But still the same error with both runtime library settings.
> > >
> > >By the way. With the MTd setting i now get even more unresolved
>externals.
> > >But it seems they don't come from Xerces and so you can't say
> > >anything for them. My project uses also the static library of
> > >wxWidgets and now i get additional wxStringData::Free unresolved
> > >external errors. They don't come up with the MDd setting.
> > >
> > >Any more to do/check/read/WhatEverYouSayIllDo?
> > >
> > >TIA once again
> > >Joerg Toellner
> > >
> > >
> > >-----Ursprüngliche Nachricht-----
> > >Von: Alberto Massari [mailto:amassari@datadirect.com]
> > >Gesendet: Mittwoch, 14. September 2005 14:08
> > >An: c-dev@xerces.apache.org
> > >Betreff: Re: AW: Linking with static library - Linking errors and
> > >unresolved external
> > >
> > >Oh, yes; you also need to switch to the static C runtime library:
> > >- in the project property dialog, click on the C/C++ folder, then on
> > >"Code Generation"
> > >- in the Runtime Library field, select "Multi-threaded Debug (/MTd)"
> > >for the Debug build, and "Multi-threaded (/MT)" for the Release
> > >build.
> > >
> > >Alberto
> > >
> > >At 12.51 14/09/2005 +0200, Joerg Toellner wrote:
> > > >Dear Alberto,
> > > >
> > > >Thank you very much. It worked so far, b I did this before, but
> > > >somehow i've read in the mailinglist-archive that i have to add the
> > > >Macro XERCES_STATIC_LIBRARY (instead of the XML_LIBRARY).
> > > >
> > > >Now the warnings are all gone. But i still have the unresolved
> > > >external error like this:
> > > >
> > > >Linking...
> > > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
> > > >fatal error LNK1120: 1 unresolved externals
> > > >
> > > >With the dll-variant this error is not occuring.
> > > >
> > > >Any hint for this last problem for me too? I will be very glad if
> > > >you can afford one more helping hand.
> > > >
> > > >TIA again
> > > >Joerg
> > > >
> > > >-----Ursprüngliche Nachricht-----
> > > >Von: Alberto Massari [mailto:amassari@datadirect.com]
> > > >Gesendet: Mittwoch, 14. September 2005 11:43
> > > >An: c-dev@xerces.apache.org
> > > >Betreff: Re: Linking with static library - Linking errors and
> > > >unresolved external
> > > >
> > > >Hi Joerg,
> > > >
> > > >At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
> > > > >[..]
> > > > >I'm not very good in playing with compiler options. So i'm now
> > > > >stuck and helpless. Would please anybody enlighten me a little
> > > > >bit so i'm able to link the xerces-libraries statically in my
> > > > >app? What i have exactly to do (step by step for lamers like me
> > > > >if possible) to get it to
> > > >work?
> > > >
> > > >Just do this:
> > > >- right click on the project entry in the "Solution Explorer" and
> > > >select "Properties"
> > > >- click on the C++ folder on the left, then on the "Preprocessor"
> > > >entry
> > > >- click on the "Preprocessor Definitions", then on the [...] button
> > > >- add the macro XML_LIBRARY to the list
> > > >- click OK to close the macro definition dialog
> > > >- repeat the steps also for the Release build configuration
> > > >- click OK to close the properties dialog
> > > >
> > > >Alberto
> > > >
> > > >P.S. For the ones who want to do the same with the unreleased
> > > >Xerces 3.0 code base, the macro has been changed into
> > > >XERCES_STATIC_LIBRARY
> > > >
> > > >
> > > > >TIA veeeery much for any hint
> > > > >Joerg Toellner
> > > > >
> > > > >Following my warnings and error messages:
> > > > >
> > > > >---------------SNIP------------------------
> > > > >Linking...
> > > > >dmpmainFrm.obj : warning LNK4049: locally defined symbol
> > > > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@
> > > > >2@
> > > > >A
> > > > >(public: static class xercesc_2_7::MemoryManager *
> > > > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > > > >
> > > > >xmldom.obj : warning LNK4049: locally defined symbol
> > > > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@
> > > > >2@
> > > > >A
> > > > >(public: static class xercesc_2_7::MemoryManager *
> > > > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > > > >
> > > > >dmpmainFrm.obj : warning LNK4217: locally defined symbol
> > > > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static
> > > > >unsigned short
> > > > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const))
> > > > >imported
> > > >in
> > > > >function "public: __thiscall XERCES_C2X::XERCES_C2X(char const *
> >const)"
> > > > >(??0XERCES_C2X@@QAE@QBD@Z)
> > > > >
> > > > >xmldom.obj : warning LNK4049: locally defined symbol
> > > > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static
> > > > >unsigned short
> > > > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const))
> > > > >imported
> > > > >
> > > > >dmpmainFrm.obj : warning LNK4217: locally defined symbol
> > > > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void
> > > > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *))
> > > > >imported in function
> > > > >"public: __thiscall XERCES_C2X::~XERCES_C2X(void)"
> > > > >(??1XERCES_C2X@@QAE@XZ)
> > > > >
> > > > >xmldom.obj : warning LNK4049: locally defined symbol
> > > > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void
> > > > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *))
> > > > >imported
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPA
> > > > >VD
> > > > >OM
> > > > >Implem
> > > >e
> > > > >ntation@2@PBG@Z (public: static class
> > > > >xercesc_2_7::DOMImplementation
> > > > >* __cdecl
> > > > >xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsi
> > > > >gn ed short const *)) imported in function "class
> > > > >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > > > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@
> > > > >2@
> > > > >QA
> > > > >VMemor
> > > >y
> > > > >Manager@2@_N@Z (public: static void __cdecl
> > > > >xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char
> > > > >const * const,class xercesc_2_7::PanicHandler * const,class
> > > > >xercesc_2_7::MemoryManager * const,bool)) imported in function
> > > > >"class xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > > > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > > > >
> > > > >xmldom.obj : warning LNK4049: locally defined symbol
> > > > >?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static
> > > > >char
> > > >const
> > > > >* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static
> > > > >void __cdecl
> > > > >xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in
> > > > >function "void __cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char
> > > > >* __cdecl xercesc_2_7::XMLString::transcode(unsigned short const
> > > > >*
> > > > >const)) imported
> > > >in
> > > > >function $L79627
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void
> > > > >__cdecl xercesc_2_7::XMLString::release(char * *)) imported in
> > > > >function $L79627
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl
> > > > >xercesc_2_7::XMemory::operator delete(void *)) imported in
> > > > >function
> > > > >$L79584
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@
> > > > >Z
> > >(public:
> > > > >__thiscall
> > > > >xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
> > > > >const * const,class xercesc_2_7::MemoryManager * const)) imported
> > > > >in function "void __cdecl dom_WriteDoc(class
> > > > >xercesc_2_7::DOMImplementation *,class xercesc_2_7::DOMDocument
> > > > >*,char
> > >*)"
> > > > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocume
> > > > >nt
> > > > >@2
> > > > >@PAD@Z
> > > >)
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl
> > > > >xercesc_2_7::XMemory::operator new(unsigned int)) imported in
> > > > >function
> > > >"void
> > > > >__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class
> > > > >xercesc_2_7::DOMDocument *,char *)"
> > > > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocume
> > > > >nt
> > > > >@2
> > > > >@PAD@Z
> > > >)
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual
> > > > >__thiscall
> > > > >xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void))
> > > > >imported in function "public: virtual void * __thiscall
> > > > >xercesc_2_7::LocalFileFormatTarget::`scalar deleting
> > > > >destructor'(unsigned int)"
> > > > >(??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
> > > > >
> > > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > > >?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned
> > > > >short
> > > >const
> > > > >* __thiscall xercesc_2_7::XMLException::getMessage(void)const )
> > > > >imported in function $L79627
> > > > >
> > > > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > > > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
> > > > >fatal error LNK1120: 1 unresolved externals
> > > > >
> > > > >Build log was saved at
> > > > "<<file://d:\EigeneDaten\Visual>file://d:\EigeneDaten\Visual
> > > >  >Studio>file://d:\EigeneDaten\Visual Studio
> > > > >Projects\xml\dmpmain\Debug\BuildLog.htm"
> > > > >dmpmain - 2 error(s), 17 warning(s)
> > > > >---------------------- Done ----------------------
> > > > >
> > > > >     Rebuild All: 0 succeeded, 1 failed, 0 skipped
> > > > >---------------SNIP------------------------
> > > > >
> > > > >
> > > > >-----------------------------------------------------------------
> > > > >--
> > > > >-- To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > > > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> > > >
> > > >
> > > >
> > > >-------------------------------------------------------------------
> > > >-- To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> > > >
> > > >
> > > >
> > > >
> > > >-------------------------------------------------------------------
> > > >-- To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> > >
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


AW: Linking with static library - Linking errors and unresolved external

Posted by Joerg Toellner <to...@oss-gmbh.de>.
Greetings Alberto,

Thanks for your answer.
UhOh! What a mess. :-(

First:
My "Ignore All Standard libraries" is set to NO. But i HAVE TO ignore the
libcmtd.lib. If not i get a looooooooooot of errors and warnings. This has
to do with the wxWidgets-Library. Ignoring the libcmtd gives me only the one
error. So "don't ignoring the libcmtd.lib" is not an option i think.

Have i another chance to get around this. Im willing to define this
mb_cur_max by myself at the moment only for my needs (Win32 only) if it is
possible. Or is it a really bad idea? And if it will work, where have i to
declare it and what value assign to it?

Second:
My library search order in Tools->Options is exactly like the following:
C:\sys\win	// Some own company libraries - Nothing that can conflict
with Standard-ones
D:\EigeneDaten\Visual Studio
Projects\xml\xerces270\Build\Win32\VC7.1\StaticRelease
D:\EigeneDaten\Visual Studio
Projects\xml\xerces270\Build\Win32\VC7.1\StaticDebug
D:\EigeneDaten\Visual Studio
Projects\xml\xerces270\Build\Win32\VC7.1\Release
D:\EigeneDaten\Visual Studio Projects\xml\xerces270\Build\Win32\VC7.1\Debug
D:\EigeneDaten\Visual Studio Projects\wxWidgets\lib\vc_lib
$(VCInstallDir)lib
$(VCInstallDir)atlmfc\lib
$(VCInstallDir)PlatformSDK\lib\prerelease
$(VCInstallDir)PlatformSDK\lib
$(FrameworkSDKDir)lib

Do you see any "bad guy" in the list?

Hope to hear from you again
CU
Joerg

-----Ursprüngliche Nachricht-----
Von: Alberto Massari [mailto:amassari@datadirect.com] 
Gesendet: Donnerstag, 15. September 2005 15:22
An: c-dev@xerces.apache.org
Betreff: Re: AW: AW: AW: Linking with static library - Linking errors and
unresolved external

Hi Joerg,
I've tried reproducing that linker error, but I've never reached the point
where just that entry point is reported as missing. The closest point I got
to was when I disabled linking against libcmt.lib (either by specifying
"Yes" to the setting Linker -> Input -> Ignore all default libraries, or by
adding libcmt.lib to the setting Linker -> Input -> Ignore specific
library), but in that case I got tons of errors, including the one for
__mb_cur_max.
So, can you check the value for those settings? 
If they are "No" and empty, can you check the list of directories containing
library files (both at the project level Linker -> General -> Additional
library directories, and at the environment level Tools | Options ->
Projects -> 
VC++ Directories -> Show Directories for: Library
files) to verify they don't include directories meant for other versions of
the Visual C++ compiler.

Alberto

At 13.55 15/09/2005 +0200, Joerg Toellner wrote:
>Hi Alberto,
>
>Sorry for bothering you again.
>
>I've now compiled wxWidgets with the /MT and /MTd (for Release and
>Debugbuild) CodeOption and then compiled my app with this new wxLibs 
>and the static Xerces-lib with the /MT and /MTd.
>
>The wx-errors are now totally gone. The only error i receive is the 
>last one from Xerces like this:
>
>Linking...
>Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: 
>unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : fatal 
>error LNK1120: 1 unresolved externals
>
>What can i do to get rid of this very last error between me and the 
>solution? Maybe you have a trick/hack/WhatToDo for me?
>
>TIA (as is said so often :-)) )
>Joerg
>
>
>-----Ursprüngliche Nachricht-----
>Von: Alberto Massari [mailto:amassari@datadirect.com]
>Gesendet: Mittwoch, 14. September 2005 15:50
>An: c-dev@xerces.apache.org
>Betreff: Re: AW: AW: Linking with static library - Linking errors and 
>unresolved external
>
>Hi Joerg,
>this is probably caused by the wxWidgets static library; the linker 
>that assembles your .exe from the two .lib files cannot handle both a 
>static and a dynamic import of the msvcrt library. Try rebuilding 
>wxWidgets with /MTd if you can, otherwise rebuild Xerces specifying 
>/MDd (clearly, Release builds should use /MT and /MD respectively)
>
>Alberto
>
>At 15.05 14/09/2005 +0200, Joerg Toellner wrote:
> >Dear Alberto,
> >
> >Thx. again! You are so grateful with your time.
> >
> >I've done what you've said.
> >
> >But even if i change my runtime library setting as you said, i still 
> >get the Xerces unresolved external.
> >
> > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
> >
> >I checked double time if i really changed to MTd and MT correctly. 
> >But still the same error with both runtime library settings.
> >
> >By the way. With the MTd setting i now get even more unresolved
externals.
> >But it seems they don't come from Xerces and so you can't say 
> >anything for them. My project uses also the static library of 
> >wxWidgets and now i get additional wxStringData::Free unresolved 
> >external errors. They don't come up with the MDd setting.
> >
> >Any more to do/check/read/WhatEverYouSayIllDo?
> >
> >TIA once again
> >Joerg Toellner
> >
> >
> >-----Ursprüngliche Nachricht-----
> >Von: Alberto Massari [mailto:amassari@datadirect.com]
> >Gesendet: Mittwoch, 14. September 2005 14:08
> >An: c-dev@xerces.apache.org
> >Betreff: Re: AW: Linking with static library - Linking errors and 
> >unresolved external
> >
> >Oh, yes; you also need to switch to the static C runtime library:
> >- in the project property dialog, click on the C/C++ folder, then on 
> >"Code Generation"
> >- in the Runtime Library field, select "Multi-threaded Debug (/MTd)" 
> >for the Debug build, and "Multi-threaded (/MT)" for the Release 
> >build.
> >
> >Alberto
> >
> >At 12.51 14/09/2005 +0200, Joerg Toellner wrote:
> > >Dear Alberto,
> > >
> > >Thank you very much. It worked so far, b I did this before, but 
> > >somehow i've read in the mailinglist-archive that i have to add the 
> > >Macro XERCES_STATIC_LIBRARY (instead of the XML_LIBRARY).
> > >
> > >Now the warnings are all gone. But i still have the unresolved 
> > >external error like this:
> > >
> > >Linking...
> > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : 
> > >fatal error LNK1120: 1 unresolved externals
> > >
> > >With the dll-variant this error is not occuring.
> > >
> > >Any hint for this last problem for me too? I will be very glad if 
> > >you can afford one more helping hand.
> > >
> > >TIA again
> > >Joerg
> > >
> > >-----Ursprüngliche Nachricht-----
> > >Von: Alberto Massari [mailto:amassari@datadirect.com]
> > >Gesendet: Mittwoch, 14. September 2005 11:43
> > >An: c-dev@xerces.apache.org
> > >Betreff: Re: Linking with static library - Linking errors and 
> > >unresolved external
> > >
> > >Hi Joerg,
> > >
> > >At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
> > > >[..]
> > > >I'm not very good in playing with compiler options. So i'm now 
> > > >stuck and helpless. Would please anybody enlighten me a little 
> > > >bit so i'm able to link the xerces-libraries statically in my 
> > > >app? What i have exactly to do (step by step for lamers like me 
> > > >if possible) to get it to
> > >work?
> > >
> > >Just do this:
> > >- right click on the project entry in the "Solution Explorer" and 
> > >select "Properties"
> > >- click on the C++ folder on the left, then on the "Preprocessor"
> > >entry
> > >- click on the "Preprocessor Definitions", then on the [...] button
> > >- add the macro XML_LIBRARY to the list
> > >- click OK to close the macro definition dialog
> > >- repeat the steps also for the Release build configuration
> > >- click OK to close the properties dialog
> > >
> > >Alberto
> > >
> > >P.S. For the ones who want to do the same with the unreleased 
> > >Xerces 3.0 code base, the macro has been changed into 
> > >XERCES_STATIC_LIBRARY
> > >
> > >
> > > >TIA veeeery much for any hint
> > > >Joerg Toellner
> > > >
> > > >Following my warnings and error messages:
> > > >
> > > >---------------SNIP------------------------
> > > >Linking...
> > > >dmpmainFrm.obj : warning LNK4049: locally defined symbol 
> > > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@
> > > >2@
> > > >A
> > > >(public: static class xercesc_2_7::MemoryManager *
> > > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > > >
> > > >xmldom.obj : warning LNK4049: locally defined symbol 
> > > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@
> > > >2@
> > > >A
> > > >(public: static class xercesc_2_7::MemoryManager *
> > > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > > >
> > > >dmpmainFrm.obj : warning LNK4217: locally defined symbol 
> > > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static 
> > > >unsigned short
> > > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) 
> > > >imported
> > >in
> > > >function "public: __thiscall XERCES_C2X::XERCES_C2X(char const *
>const)"
> > > >(??0XERCES_C2X@@QAE@QBD@Z)
> > > >
> > > >xmldom.obj : warning LNK4049: locally defined symbol 
> > > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static 
> > > >unsigned short
> > > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) 
> > > >imported
> > > >
> > > >dmpmainFrm.obj : warning LNK4217: locally defined symbol 
> > > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void 
> > > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *)) 
> > > >imported in function
> > > >"public: __thiscall XERCES_C2X::~XERCES_C2X(void)"
> > > >(??1XERCES_C2X@@QAE@XZ)
> > > >
> > > >xmldom.obj : warning LNK4049: locally defined symbol 
> > > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void 
> > > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *)) 
> > > >imported
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPA
> > > >VD
> > > >OM
> > > >Implem
> > >e
> > > >ntation@2@PBG@Z (public: static class 
> > > >xercesc_2_7::DOMImplementation
> > > >* __cdecl
> > > >xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsi
> > > >gn ed short const *)) imported in function "class 
> > > >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@
> > > >2@
> > > >QA
> > > >VMemor
> > >y
> > > >Manager@2@_N@Z (public: static void __cdecl 
> > > >xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char 
> > > >const * const,class xercesc_2_7::PanicHandler * const,class 
> > > >xercesc_2_7::MemoryManager * const,bool)) imported in function 
> > > >"class xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > > >
> > > >xmldom.obj : warning LNK4049: locally defined symbol 
> > > >?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static 
> > > >char
> > >const
> > > >* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static 
> > > >void __cdecl
> > > >xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in 
> > > >function "void __cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char 
> > > >* __cdecl xercesc_2_7::XMLString::transcode(unsigned short const 
> > > >*
> > > >const)) imported
> > >in
> > > >function $L79627
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void 
> > > >__cdecl xercesc_2_7::XMLString::release(char * *)) imported in 
> > > >function $L79627
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl 
> > > >xercesc_2_7::XMemory::operator delete(void *)) imported in 
> > > >function
> > > >$L79584
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@
> > > >Z
> >(public:
> > > >__thiscall
> > > >xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
> > > >const * const,class xercesc_2_7::MemoryManager * const)) imported 
> > > >in function "void __cdecl dom_WriteDoc(class 
> > > >xercesc_2_7::DOMImplementation *,class xercesc_2_7::DOMDocument 
> > > >*,char
> >*)"
> > > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocume
> > > >nt
> > > >@2
> > > >@PAD@Z
> > >)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl 
> > > >xercesc_2_7::XMemory::operator new(unsigned int)) imported in 
> > > >function
> > >"void
> > > >__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class 
> > > >xercesc_2_7::DOMDocument *,char *)"
> > > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocume
> > > >nt
> > > >@2
> > > >@PAD@Z
> > >)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual 
> > > >__thiscall
> > > >xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void))
> > > >imported in function "public: virtual void * __thiscall 
> > > >xercesc_2_7::LocalFileFormatTarget::`scalar deleting 
> > > >destructor'(unsigned int)"
> > > >(??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol 
> > > >?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned 
> > > >short
> > >const
> > > >* __thiscall xercesc_2_7::XMLException::getMessage(void)const ) 
> > > >imported in function $L79627
> > > >
> > > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
> > > >fatal error LNK1120: 1 unresolved externals
> > > >
> > > >Build log was saved at
> > > "<<file://d:\EigeneDaten\Visual>file://d:\EigeneDaten\Visual
> > >  >Studio>file://d:\EigeneDaten\Visual Studio
> > > >Projects\xml\dmpmain\Debug\BuildLog.htm"
> > > >dmpmain - 2 error(s), 17 warning(s)
> > > >---------------------- Done ----------------------
> > > >
> > > >     Rebuild All: 0 succeeded, 1 failed, 0 skipped
> > > >---------------SNIP------------------------
> > > >
> > > >
> > > >-----------------------------------------------------------------
> > > >--
> > > >-- To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> > >
> > >
> > >
> > >-------------------------------------------------------------------
> > >-- To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> > >
> > >
> > >
> > >
> > >-------------------------------------------------------------------
> > >-- To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: AW: AW: AW: Linking with static library - Linking errors and unresolved external

Posted by Alberto Massari <am...@datadirect.com>.
Hi Joerg,
I've tried reproducing that linker error, but 
I've never reached the point where just that 
entry point is reported as missing. The closest 
point I got to was when I disabled linking 
against libcmt.lib (either by specifying "Yes" to 
the setting Linker -> Input -> Ignore all default 
libraries, or by adding libcmt.lib to the setting 
Linker -> Input -> Ignore specific library), but 
in that case I got tons of errors, including the one for __mb_cur_max.
So, can you check the value for those settings? 
If they are "No" and empty, can you check the 
list of directories containing library files 
(both at the project level Linker -> General -> 
Additional library directories, and at the 
environment level Tools | Options -> Projects -> 
VC++ Directories -> Show Directories for: Library 
files) to verify they don't include directories 
meant for other versions of the Visual C++ compiler.

Alberto

At 13.55 15/09/2005 +0200, Joerg Toellner wrote:
>Hi Alberto,
>
>Sorry for bothering you again.
>
>I've now compiled wxWidgets with the /MT and /MTd (for Release and
>Debugbuild) CodeOption and then compiled my app with this new wxLibs and the
>static Xerces-lib with the /MT and /MTd.
>
>The wx-errors are now totally gone. The only error i receive is the last one
>from Xerces like this:
>
>Linking...
>Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: unresolved
>external symbol ___mb_cur_max
>.\Debug/dmpmain.exe : fatal error LNK1120: 1 unresolved externals
>
>What can i do to get rid of this very last error between me and the
>solution? Maybe you have a trick/hack/WhatToDo for me?
>
>TIA (as is said so often :-)) )
>Joerg
>
>
>-----Ursprüngliche Nachricht-----
>Von: Alberto Massari [mailto:amassari@datadirect.com]
>Gesendet: Mittwoch, 14. September 2005 15:50
>An: c-dev@xerces.apache.org
>Betreff: Re: AW: AW: Linking with static library - Linking errors and
>unresolved external
>
>Hi Joerg,
>this is probably caused by the wxWidgets static library; the linker that
>assembles your .exe from the two .lib files cannot handle both a static and
>a dynamic import of the msvcrt library. Try rebuilding wxWidgets with /MTd
>if you can, otherwise rebuild Xerces specifying /MDd (clearly, Release
>builds should use /MT and /MD respectively)
>
>Alberto
>
>At 15.05 14/09/2005 +0200, Joerg Toellner wrote:
> >Dear Alberto,
> >
> >Thx. again! You are so grateful with your time.
> >
> >I've done what you've said.
> >
> >But even if i change my runtime library setting as you said, i still
> >get the Xerces unresolved external.
> >
> > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
> >
> >I checked double time if i really changed to MTd and MT correctly. But
> >still the same error with both runtime library settings.
> >
> >By the way. With the MTd setting i now get even more unresolved externals.
> >But it seems they don't come from Xerces and so you can't say anything
> >for them. My project uses also the static library of wxWidgets and now
> >i get additional wxStringData::Free unresolved external errors. They
> >don't come up with the MDd setting.
> >
> >Any more to do/check/read/WhatEverYouSayIllDo?
> >
> >TIA once again
> >Joerg Toellner
> >
> >
> >-----Ursprüngliche Nachricht-----
> >Von: Alberto Massari [mailto:amassari@datadirect.com]
> >Gesendet: Mittwoch, 14. September 2005 14:08
> >An: c-dev@xerces.apache.org
> >Betreff: Re: AW: Linking with static library - Linking errors and
> >unresolved external
> >
> >Oh, yes; you also need to switch to the static C runtime library:
> >- in the project property dialog, click on the C/C++ folder, then on
> >"Code Generation"
> >- in the Runtime Library field, select
> >"Multi-threaded Debug (/MTd)" for the Debug build, and "Multi-threaded
> >(/MT)" for the Release build.
> >
> >Alberto
> >
> >At 12.51 14/09/2005 +0200, Joerg Toellner wrote:
> > >Dear Alberto,
> > >
> > >Thank you very much. It worked so far, b I did this before, but
> > >somehow i've read in the mailinglist-archive that i have to add the
> > >Macro XERCES_STATIC_LIBRARY (instead of the XML_LIBRARY).
> > >
> > >Now the warnings are all gone. But i still have the unresolved
> > >external error like this:
> > >
> > >Linking...
> > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : fatal
> > >error LNK1120: 1 unresolved externals
> > >
> > >With the dll-variant this error is not occuring.
> > >
> > >Any hint for this last problem for me too? I will be very glad if you
> > >can afford one more helping hand.
> > >
> > >TIA again
> > >Joerg
> > >
> > >-----Ursprüngliche Nachricht-----
> > >Von: Alberto Massari [mailto:amassari@datadirect.com]
> > >Gesendet: Mittwoch, 14. September 2005 11:43
> > >An: c-dev@xerces.apache.org
> > >Betreff: Re: Linking with static library - Linking errors and
> > >unresolved external
> > >
> > >Hi Joerg,
> > >
> > >At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
> > > >[..]
> > > >I'm not very good in playing with compiler options. So i'm now
> > > >stuck and helpless. Would please anybody enlighten me a little bit
> > > >so i'm able to link the xerces-libraries statically in my app? What
> > > >i have exactly to do (step by step for lamers like me if possible)
> > > >to get it to
> > >work?
> > >
> > >Just do this:
> > >- right click on the project entry in the "Solution Explorer" and
> > >select "Properties"
> > >- click on the C++ folder on the left, then on the "Preprocessor"
> > >entry
> > >- click on the "Preprocessor Definitions", then on the [...] button
> > >- add the macro XML_LIBRARY to the list
> > >- click OK to close the macro definition dialog
> > >- repeat the steps also for the Release build configuration
> > >- click OK to close the properties dialog
> > >
> > >Alberto
> > >
> > >P.S. For the ones who want to do the same with the unreleased Xerces
> > >3.0 code base, the macro has been changed into XERCES_STATIC_LIBRARY
> > >
> > >
> > > >TIA veeeery much for any hint
> > > >Joerg Toellner
> > > >
> > > >Following my warnings and error messages:
> > > >
> > > >---------------SNIP------------------------
> > > >Linking...
> > > >dmpmainFrm.obj : warning LNK4049: locally defined symbol
> > > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@
> > > >A
> > > >(public: static class xercesc_2_7::MemoryManager *
> > > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > > >
> > > >xmldom.obj : warning LNK4049: locally defined symbol
> > > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@
> > > >A
> > > >(public: static class xercesc_2_7::MemoryManager *
> > > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > > >
> > > >dmpmainFrm.obj : warning LNK4217: locally defined symbol
> > > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static
> > > >unsigned short
> > > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const))
> > > >imported
> > >in
> > > >function "public: __thiscall XERCES_C2X::XERCES_C2X(char const *
>const)"
> > > >(??0XERCES_C2X@@QAE@QBD@Z)
> > > >
> > > >xmldom.obj : warning LNK4049: locally defined symbol
> > > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static
> > > >unsigned short
> > > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const))
> > > >imported
> > > >
> > > >dmpmainFrm.obj : warning LNK4217: locally defined symbol
> > > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void
> > > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *))
> > > >imported in function
> > > >"public: __thiscall XERCES_C2X::~XERCES_C2X(void)"
> > > >(??1XERCES_C2X@@QAE@XZ)
> > > >
> > > >xmldom.obj : warning LNK4049: locally defined symbol
> > > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void
> > > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *))
> > > >imported
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPAVD
> > > >OM
> > > >Implem
> > >e
> > > >ntation@2@PBG@Z (public: static class
> > > >xercesc_2_7::DOMImplementation
> > > >* __cdecl
> > > >xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsign
> > > >ed short const *)) imported in function "class
> > > >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@2@
> > > >QA
> > > >VMemor
> > >y
> > > >Manager@2@_N@Z (public: static void __cdecl
> > > >xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char
> > > >const * const,class xercesc_2_7::PanicHandler * const,class
> > > >xercesc_2_7::MemoryManager * const,bool)) imported in function
> > > >"class xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > > >
> > > >xmldom.obj : warning LNK4049: locally defined symbol
> > > >?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static
> > > >char
> > >const
> > > >* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static void
> > > >__cdecl
> > > >xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in
> > > >function "void __cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char *
> > > >__cdecl xercesc_2_7::XMLString::transcode(unsigned short const *
> > > >const)) imported
> > >in
> > > >function $L79627
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void
> > > >__cdecl xercesc_2_7::XMLString::release(char * *)) imported in
> > > >function $L79627
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl
> > > >xercesc_2_7::XMemory::operator delete(void *)) imported in function
> > > >$L79584
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@Z
> >(public:
> > > >__thiscall
> > > >xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
> > > >const * const,class xercesc_2_7::MemoryManager * const)) imported
> > > >in function "void __cdecl dom_WriteDoc(class
> > > >xercesc_2_7::DOMImplementation *,class xercesc_2_7::DOMDocument
> > > >*,char
> >*)"
> > > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument
> > > >@2
> > > >@PAD@Z
> > >)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl
> > > >xercesc_2_7::XMemory::operator new(unsigned int)) imported in
> > > >function
> > >"void
> > > >__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class
> > > >xercesc_2_7::DOMDocument *,char *)"
> > > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument
> > > >@2
> > > >@PAD@Z
> > >)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual
> > > >__thiscall
> > > >xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void))
> > > >imported in function "public: virtual void * __thiscall
> > > >xercesc_2_7::LocalFileFormatTarget::`scalar deleting
> > > >destructor'(unsigned int)"
> > > >(??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
> > > >
> > > >xmldom.obj : warning LNK4217: locally defined symbol
> > > >?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned
> > > >short
> > >const
> > > >* __thiscall xercesc_2_7::XMLException::getMessage(void)const )
> > > >imported in function $L79627
> > > >
> > > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
> > > >fatal error LNK1120: 1 unresolved externals
> > > >
> > > >Build log was saved at
> > > "<<file://d:\EigeneDaten\Visual>file://d:\EigeneDaten\Visual
> > >  >Studio>file://d:\EigeneDaten\Visual Studio
> > > >Projects\xml\dmpmain\Debug\BuildLog.htm"
> > > >dmpmain - 2 error(s), 17 warning(s)
> > > >---------------------- Done ----------------------
> > > >
> > > >     Rebuild All: 0 succeeded, 1 failed, 0 skipped
> > > >---------------SNIP------------------------
> > > >
> > > >
> > > >-------------------------------------------------------------------
> > > >-- To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> > >
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


AW: AW: AW: Linking with static library - Linking errors and unresolved external

Posted by Joerg Toellner <to...@oss-gmbh.de>.
Hi Alberto,

Sorry for bothering you again.

I've now compiled wxWidgets with the /MT and /MTd (for Release and
Debugbuild) CodeOption and then compiled my app with this new wxLibs and the
static Xerces-lib with the /MT and /MTd.

The wx-errors are now totally gone. The only error i receive is the last one
from Xerces like this:

Linking...
Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: unresolved
external symbol ___mb_cur_max
.\Debug/dmpmain.exe : fatal error LNK1120: 1 unresolved externals

What can i do to get rid of this very last error between me and the
solution? Maybe you have a trick/hack/WhatToDo for me?

TIA (as is said so often :-)) )
Joerg
 

-----Ursprüngliche Nachricht-----
Von: Alberto Massari [mailto:amassari@datadirect.com] 
Gesendet: Mittwoch, 14. September 2005 15:50
An: c-dev@xerces.apache.org
Betreff: Re: AW: AW: Linking with static library - Linking errors and
unresolved external

Hi Joerg,
this is probably caused by the wxWidgets static library; the linker that
assembles your .exe from the two .lib files cannot handle both a static and
a dynamic import of the msvcrt library. Try rebuilding wxWidgets with /MTd
if you can, otherwise rebuild Xerces specifying /MDd (clearly, Release
builds should use /MT and /MD respectively)

Alberto

At 15.05 14/09/2005 +0200, Joerg Toellner wrote:
>Dear Alberto,
>
>Thx. again! You are so grateful with your time.
>
>I've done what you've said.
>
>But even if i change my runtime library setting as you said, i still 
>get the Xerces unresolved external.
>
> >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
>
>I checked double time if i really changed to MTd and MT correctly. But 
>still the same error with both runtime library settings.
>
>By the way. With the MTd setting i now get even more unresolved externals.
>But it seems they don't come from Xerces and so you can't say anything 
>for them. My project uses also the static library of wxWidgets and now 
>i get additional wxStringData::Free unresolved external errors. They 
>don't come up with the MDd setting.
>
>Any more to do/check/read/WhatEverYouSayIllDo?
>
>TIA once again
>Joerg Toellner
>
>
>-----Ursprüngliche Nachricht-----
>Von: Alberto Massari [mailto:amassari@datadirect.com]
>Gesendet: Mittwoch, 14. September 2005 14:08
>An: c-dev@xerces.apache.org
>Betreff: Re: AW: Linking with static library - Linking errors and 
>unresolved external
>
>Oh, yes; you also need to switch to the static C runtime library:
>- in the project property dialog, click on the C/C++ folder, then on 
>"Code Generation"
>- in the Runtime Library field, select
>"Multi-threaded Debug (/MTd)" for the Debug build, and "Multi-threaded 
>(/MT)" for the Release build.
>
>Alberto
>
>At 12.51 14/09/2005 +0200, Joerg Toellner wrote:
> >Dear Alberto,
> >
> >Thank you very much. It worked so far, b I did this before, but 
> >somehow i've read in the mailinglist-archive that i have to add the 
> >Macro XERCES_STATIC_LIBRARY (instead of the XML_LIBRARY).
> >
> >Now the warnings are all gone. But i still have the unresolved 
> >external error like this:
> >
> >Linking...
> >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : fatal 
> >error LNK1120: 1 unresolved externals
> >
> >With the dll-variant this error is not occuring.
> >
> >Any hint for this last problem for me too? I will be very glad if you 
> >can afford one more helping hand.
> >
> >TIA again
> >Joerg
> >
> >-----Ursprüngliche Nachricht-----
> >Von: Alberto Massari [mailto:amassari@datadirect.com]
> >Gesendet: Mittwoch, 14. September 2005 11:43
> >An: c-dev@xerces.apache.org
> >Betreff: Re: Linking with static library - Linking errors and 
> >unresolved external
> >
> >Hi Joerg,
> >
> >At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
> > >[..]
> > >I'm not very good in playing with compiler options. So i'm now 
> > >stuck and helpless. Would please anybody enlighten me a little bit 
> > >so i'm able to link the xerces-libraries statically in my app? What 
> > >i have exactly to do (step by step for lamers like me if possible) 
> > >to get it to
> >work?
> >
> >Just do this:
> >- right click on the project entry in the "Solution Explorer" and 
> >select "Properties"
> >- click on the C++ folder on the left, then on the "Preprocessor" 
> >entry
> >- click on the "Preprocessor Definitions", then on the [...] button
> >- add the macro XML_LIBRARY to the list
> >- click OK to close the macro definition dialog
> >- repeat the steps also for the Release build configuration
> >- click OK to close the properties dialog
> >
> >Alberto
> >
> >P.S. For the ones who want to do the same with the unreleased Xerces 
> >3.0 code base, the macro has been changed into XERCES_STATIC_LIBRARY
> >
> >
> > >TIA veeeery much for any hint
> > >Joerg Toellner
> > >
> > >Following my warnings and error messages:
> > >
> > >---------------SNIP------------------------
> > >Linking...
> > >dmpmainFrm.obj : warning LNK4049: locally defined symbol 
> > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@
> > >A
> > >(public: static class xercesc_2_7::MemoryManager *
> > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > >
> > >xmldom.obj : warning LNK4049: locally defined symbol 
> > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@
> > >A
> > >(public: static class xercesc_2_7::MemoryManager *
> > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > >
> > >dmpmainFrm.obj : warning LNK4217: locally defined symbol 
> > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static 
> > >unsigned short
> > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) 
> > >imported
> >in
> > >function "public: __thiscall XERCES_C2X::XERCES_C2X(char const *
const)"
> > >(??0XERCES_C2X@@QAE@QBD@Z)
> > >
> > >xmldom.obj : warning LNK4049: locally defined symbol 
> > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static 
> > >unsigned short
> > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) 
> > >imported
> > >
> > >dmpmainFrm.obj : warning LNK4217: locally defined symbol 
> > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void 
> > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *)) 
> > >imported in function
> > >"public: __thiscall XERCES_C2X::~XERCES_C2X(void)"
> > >(??1XERCES_C2X@@QAE@XZ)
> > >
> > >xmldom.obj : warning LNK4049: locally defined symbol 
> > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void 
> > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *)) 
> > >imported
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPAVD
> > >OM
> > >Implem
> >e
> > >ntation@2@PBG@Z (public: static class 
> > >xercesc_2_7::DOMImplementation
> > >* __cdecl
> > >xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsign
> > >ed short const *)) imported in function "class 
> > >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@2@
> > >QA
> > >VMemor
> >y
> > >Manager@2@_N@Z (public: static void __cdecl 
> > >xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char 
> > >const * const,class xercesc_2_7::PanicHandler * const,class 
> > >xercesc_2_7::MemoryManager * const,bool)) imported in function 
> > >"class xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > >
> > >xmldom.obj : warning LNK4049: locally defined symbol 
> > >?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static 
> > >char
> >const
> > >* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static void 
> > >__cdecl
> > >xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in 
> > >function "void __cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char * 
> > >__cdecl xercesc_2_7::XMLString::transcode(unsigned short const *
> > >const)) imported
> >in
> > >function $L79627
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void 
> > >__cdecl xercesc_2_7::XMLString::release(char * *)) imported in 
> > >function $L79627
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl 
> > >xercesc_2_7::XMemory::operator delete(void *)) imported in function
> > >$L79584
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@Z
>(public:
> > >__thiscall
> > >xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
> > >const * const,class xercesc_2_7::MemoryManager * const)) imported 
> > >in function "void __cdecl dom_WriteDoc(class 
> > >xercesc_2_7::DOMImplementation *,class xercesc_2_7::DOMDocument 
> > >*,char
>*)"
> > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument
> > >@2
> > >@PAD@Z
> >)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl 
> > >xercesc_2_7::XMemory::operator new(unsigned int)) imported in 
> > >function
> >"void
> > >__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class 
> > >xercesc_2_7::DOMDocument *,char *)"
> > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument
> > >@2
> > >@PAD@Z
> >)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual 
> > >__thiscall
> > >xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void))
> > >imported in function "public: virtual void * __thiscall 
> > >xercesc_2_7::LocalFileFormatTarget::`scalar deleting 
> > >destructor'(unsigned int)"
> > >(??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol 
> > >?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned 
> > >short
> >const
> > >* __thiscall xercesc_2_7::XMLException::getMessage(void)const ) 
> > >imported in function $L79627
> > >
> > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : 
> > >fatal error LNK1120: 1 unresolved externals
> > >
> > >Build log was saved at
> > "<<file://d:\EigeneDaten\Visual>file://d:\EigeneDaten\Visual
> >  >Studio>file://d:\EigeneDaten\Visual Studio
> > >Projects\xml\dmpmain\Debug\BuildLog.htm"
> > >dmpmain - 2 error(s), 17 warning(s)
> > >---------------------- Done ----------------------
> > >
> > >     Rebuild All: 0 succeeded, 1 failed, 0 skipped
> > >---------------SNIP------------------------
> > >
> > >
> > >-------------------------------------------------------------------
> > >-- To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: AW: AW: Linking with static library - Linking errors and unresolved external

Posted by Alberto Massari <am...@datadirect.com>.
Hi Joerg,
this is probably caused by the wxWidgets static 
library; the linker that assembles your .exe from 
the two .lib files cannot handle both a static 
and a dynamic import of the msvcrt library. Try 
rebuilding wxWidgets with /MTd if you can, 
otherwise rebuild Xerces specifying /MDd 
(clearly, Release builds should use /MT and /MD respectively)

Alberto

At 15.05 14/09/2005 +0200, Joerg Toellner wrote:
>Dear Alberto,
>
>Thx. again! You are so grateful with your time.
>
>I've done what you've said.
>
>But even if i change my runtime library setting as you said, i still get the
>Xerces unresolved external.
>
> >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe :
>
>I checked double time if i really changed to MTd and MT correctly. But still
>the same error with both runtime library settings.
>
>By the way. With the MTd setting i now get even more unresolved externals.
>But it seems they don't come from Xerces and so you can't say anything for
>them. My project uses also the static library of wxWidgets and now i get
>additional wxStringData::Free unresolved external errors. They don't come up
>with the MDd setting.
>
>Any more to do/check/read/WhatEverYouSayIllDo?
>
>TIA once again
>Joerg Toellner
>
>
>-----Ursprüngliche Nachricht-----
>Von: Alberto Massari [mailto:amassari@datadirect.com]
>Gesendet: Mittwoch, 14. September 2005 14:08
>An: c-dev@xerces.apache.org
>Betreff: Re: AW: Linking with static library - Linking errors and unresolved
>external
>
>Oh, yes; you also need to switch to the static C runtime library:
>- in the project property dialog, click on the C/C++ folder, then on "Code
>Generation"
>- in the Runtime Library field, select
>"Multi-threaded Debug (/MTd)" for the Debug build, and "Multi-threaded
>(/MT)" for the Release build.
>
>Alberto
>
>At 12.51 14/09/2005 +0200, Joerg Toellner wrote:
> >Dear Alberto,
> >
> >Thank you very much. It worked so far, b I did this before, but somehow
> >i've read in the mailinglist-archive that i have to add the Macro
> >XERCES_STATIC_LIBRARY (instead of the XML_LIBRARY).
> >
> >Now the warnings are all gone. But i still have the unresolved external
> >error like this:
> >
> >Linking...
> >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : fatal
> >error LNK1120: 1 unresolved externals
> >
> >With the dll-variant this error is not occuring.
> >
> >Any hint for this last problem for me too? I will be very glad if you
> >can afford one more helping hand.
> >
> >TIA again
> >Joerg
> >
> >-----Ursprüngliche Nachricht-----
> >Von: Alberto Massari [mailto:amassari@datadirect.com]
> >Gesendet: Mittwoch, 14. September 2005 11:43
> >An: c-dev@xerces.apache.org
> >Betreff: Re: Linking with static library - Linking errors and
> >unresolved external
> >
> >Hi Joerg,
> >
> >At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
> > >[..]
> > >I'm not very good in playing with compiler options. So i'm now stuck
> > >and helpless. Would please anybody enlighten me a little bit so i'm
> > >able to link the xerces-libraries statically in my app? What i have
> > >exactly to do (step by step for lamers like me if possible) to get it
> > >to
> >work?
> >
> >Just do this:
> >- right click on the project entry in the "Solution Explorer" and
> >select "Properties"
> >- click on the C++ folder on the left, then on the "Preprocessor" entry
> >- click on the "Preprocessor Definitions", then on the [...] button
> >- add the macro XML_LIBRARY to the list
> >- click OK to close the macro definition dialog
> >- repeat the steps also for the Release build configuration
> >- click OK to close the properties dialog
> >
> >Alberto
> >
> >P.S. For the ones who want to do the same with the unreleased Xerces
> >3.0 code base, the macro has been changed into XERCES_STATIC_LIBRARY
> >
> >
> > >TIA veeeery much for any hint
> > >Joerg Toellner
> > >
> > >Following my warnings and error messages:
> > >
> > >---------------SNIP------------------------
> > >Linking...
> > >dmpmainFrm.obj : warning LNK4049: locally defined symbol
> > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
> > >(public: static class xercesc_2_7::MemoryManager *
> > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > >
> > >xmldom.obj : warning LNK4049: locally defined symbol
> > >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
> > >(public: static class xercesc_2_7::MemoryManager *
> > >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> > >
> > >dmpmainFrm.obj : warning LNK4217: locally defined symbol
> > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned
> > >short
> > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const))
> > >imported
> >in
> > >function "public: __thiscall XERCES_C2X::XERCES_C2X(char const * const)"
> > >(??0XERCES_C2X@@QAE@QBD@Z)
> > >
> > >xmldom.obj : warning LNK4049: locally defined symbol
> > >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned
> > >short
> > >* __cdecl xercesc_2_7::XMLString::transcode(char const * const))
> > >imported
> > >
> > >dmpmainFrm.obj : warning LNK4217: locally defined symbol
> > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void
> > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *)) imported
> > >in function
> > >"public: __thiscall XERCES_C2X::~XERCES_C2X(void)"
> > >(??1XERCES_C2X@@QAE@XZ)
> > >
> > >xmldom.obj : warning LNK4049: locally defined symbol
> > >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void
> > >__cdecl xercesc_2_7::XMLString::release(unsigned short * *)) imported
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPAVDOM
> > >Implem
> >e
> > >ntation@2@PBG@Z (public: static class xercesc_2_7::DOMImplementation
> > >* __cdecl
> > >xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsigned
> > >short const *)) imported in function "class
> > >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@2@QA
> > >VMemor
> >y
> > >Manager@2@_N@Z (public: static void __cdecl
> > >xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char
> > >const * const,class xercesc_2_7::PanicHandler * const,class
> > >xercesc_2_7::MemoryManager * const,bool)) imported in function "class
> > >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> > >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> > >
> > >xmldom.obj : warning LNK4049: locally defined symbol
> > >?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static
> > >char
> >const
> > >* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static void
> > >__cdecl
> > >xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in function
> > >"void __cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char *
> > >__cdecl xercesc_2_7::XMLString::transcode(unsigned short const *
> > >const)) imported
> >in
> > >function $L79627
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void
> > >__cdecl xercesc_2_7::XMLString::release(char * *)) imported in
> > >function $L79627
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl
> > >xercesc_2_7::XMemory::operator delete(void *)) imported in function
> > >$L79584
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@Z
>(public:
> > >__thiscall
> > >xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
> > >const * const,class xercesc_2_7::MemoryManager * const)) imported in
> > >function "void __cdecl dom_WriteDoc(class
> > >xercesc_2_7::DOMImplementation *,class xercesc_2_7::DOMDocument *,char
>*)"
> > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2
> > >@PAD@Z
> >)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl
> > >xercesc_2_7::XMemory::operator new(unsigned int)) imported in
> > >function
> >"void
> > >__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class
> > >xercesc_2_7::DOMDocument *,char *)"
> > >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2
> > >@PAD@Z
> >)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual
> > >__thiscall
> > >xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void))
> > >imported in function "public: virtual void * __thiscall
> > >xercesc_2_7::LocalFileFormatTarget::`scalar deleting
> > >destructor'(unsigned int)"
> > >(??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
> > >
> > >xmldom.obj : warning LNK4217: locally defined symbol
> > >?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned
> > >short
> >const
> > >* __thiscall xercesc_2_7::XMLException::getMessage(void)const )
> > >imported in function $L79627
> > >
> > >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001:
> > >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : fatal
> > >error LNK1120: 1 unresolved externals
> > >
> > >Build log was saved at
> > "<<file://d:\EigeneDaten\Visual>file://d:\EigeneDaten\Visual
> >  >Studio>file://d:\EigeneDaten\Visual Studio
> > >Projects\xml\dmpmain\Debug\BuildLog.htm"
> > >dmpmain - 2 error(s), 17 warning(s)
> > >---------------------- Done ----------------------
> > >
> > >     Rebuild All: 0 succeeded, 1 failed, 0 skipped
> > >---------------SNIP------------------------
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


AW: AW: Linking with static library - Linking errors and unresolved external

Posted by Joerg Toellner <to...@oss-gmbh.de>.
Dear Alberto,

Thx. again! You are so grateful with your time.

I've done what you've said.

But even if i change my runtime library setting as you said, i still get the
Xerces unresolved external.

>Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: 
>unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : 

I checked double time if i really changed to MTd and MT correctly. But still
the same error with both runtime library settings.

By the way. With the MTd setting i now get even more unresolved externals.
But it seems they don't come from Xerces and so you can't say anything for
them. My project uses also the static library of wxWidgets and now i get
additional wxStringData::Free unresolved external errors. They don't come up
with the MDd setting.

Any more to do/check/read/WhatEverYouSayIllDo?

TIA once again
Joerg Toellner


-----Ursprüngliche Nachricht-----
Von: Alberto Massari [mailto:amassari@datadirect.com] 
Gesendet: Mittwoch, 14. September 2005 14:08
An: c-dev@xerces.apache.org
Betreff: Re: AW: Linking with static library - Linking errors and unresolved
external

Oh, yes; you also need to switch to the static C runtime library:
- in the project property dialog, click on the C/C++ folder, then on "Code
Generation"
- in the Runtime Library field, select
"Multi-threaded Debug (/MTd)" for the Debug build, and "Multi-threaded
(/MT)" for the Release build.

Alberto

At 12.51 14/09/2005 +0200, Joerg Toellner wrote:
>Dear Alberto,
>
>Thank you very much. It worked so far, b I did this before, but somehow 
>i've read in the mailinglist-archive that i have to add the Macro 
>XERCES_STATIC_LIBRARY (instead of the XML_LIBRARY).
>
>Now the warnings are all gone. But i still have the unresolved external 
>error like this:
>
>Linking...
>Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: 
>unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : fatal 
>error LNK1120: 1 unresolved externals
>
>With the dll-variant this error is not occuring.
>
>Any hint for this last problem for me too? I will be very glad if you 
>can afford one more helping hand.
>
>TIA again
>Joerg
>
>-----Ursprüngliche Nachricht-----
>Von: Alberto Massari [mailto:amassari@datadirect.com]
>Gesendet: Mittwoch, 14. September 2005 11:43
>An: c-dev@xerces.apache.org
>Betreff: Re: Linking with static library - Linking errors and 
>unresolved external
>
>Hi Joerg,
>
>At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
> >[..]
> >I'm not very good in playing with compiler options. So i'm now stuck 
> >and helpless. Would please anybody enlighten me a little bit so i'm 
> >able to link the xerces-libraries statically in my app? What i have 
> >exactly to do (step by step for lamers like me if possible) to get it 
> >to
>work?
>
>Just do this:
>- right click on the project entry in the "Solution Explorer" and 
>select "Properties"
>- click on the C++ folder on the left, then on the "Preprocessor" entry
>- click on the "Preprocessor Definitions", then on the [...] button
>- add the macro XML_LIBRARY to the list
>- click OK to close the macro definition dialog
>- repeat the steps also for the Release build configuration
>- click OK to close the properties dialog
>
>Alberto
>
>P.S. For the ones who want to do the same with the unreleased Xerces 
>3.0 code base, the macro has been changed into XERCES_STATIC_LIBRARY
>
>
> >TIA veeeery much for any hint
> >Joerg Toellner
> >
> >Following my warnings and error messages:
> >
> >---------------SNIP------------------------
> >Linking...
> >dmpmainFrm.obj : warning LNK4049: locally defined symbol 
> >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
> >(public: static class xercesc_2_7::MemoryManager *
> >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> >
> >xmldom.obj : warning LNK4049: locally defined symbol 
> >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
> >(public: static class xercesc_2_7::MemoryManager *
> >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> >
> >dmpmainFrm.obj : warning LNK4217: locally defined symbol 
> >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned 
> >short
> >* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) 
> >imported
>in
> >function "public: __thiscall XERCES_C2X::XERCES_C2X(char const * const)"
> >(??0XERCES_C2X@@QAE@QBD@Z)
> >
> >xmldom.obj : warning LNK4049: locally defined symbol 
> >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned 
> >short
> >* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) 
> >imported
> >
> >dmpmainFrm.obj : warning LNK4217: locally defined symbol 
> >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void 
> >__cdecl xercesc_2_7::XMLString::release(unsigned short * *)) imported 
> >in function
> >"public: __thiscall XERCES_C2X::~XERCES_C2X(void)" 
> >(??1XERCES_C2X@@QAE@XZ)
> >
> >xmldom.obj : warning LNK4049: locally defined symbol 
> >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void 
> >__cdecl xercesc_2_7::XMLString::release(unsigned short * *)) imported
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPAVDOM
> >Implem
>e
> >ntation@2@PBG@Z (public: static class xercesc_2_7::DOMImplementation 
> >* __cdecl 
> >xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsigned 
> >short const *)) imported in function "class 
> >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)" 
> >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@2@QA
> >VMemor
>y
> >Manager@2@_N@Z (public: static void __cdecl 
> >xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char 
> >const * const,class xercesc_2_7::PanicHandler * const,class 
> >xercesc_2_7::MemoryManager * const,bool)) imported in function "class 
> >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> >
> >xmldom.obj : warning LNK4049: locally defined symbol 
> >?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static 
> >char
>const
> >* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static void 
> >__cdecl
> >xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in function 
> >"void __cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char * 
> >__cdecl xercesc_2_7::XMLString::transcode(unsigned short const * 
> >const)) imported
>in
> >function $L79627
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void 
> >__cdecl xercesc_2_7::XMLString::release(char * *)) imported in 
> >function $L79627
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl 
> >xercesc_2_7::XMemory::operator delete(void *)) imported in function 
> >$L79584
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@Z
(public:
> >__thiscall 
> >xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
> >const * const,class xercesc_2_7::MemoryManager * const)) imported in 
> >function "void __cdecl dom_WriteDoc(class 
> >xercesc_2_7::DOMImplementation *,class xercesc_2_7::DOMDocument *,char
*)"
> >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2
> >@PAD@Z
>)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl 
> >xercesc_2_7::XMemory::operator new(unsigned int)) imported in 
> >function
>"void
> >__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class 
> >xercesc_2_7::DOMDocument *,char *)"
> >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2
> >@PAD@Z
>)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual 
> >__thiscall
> >xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void)) 
> >imported in function "public: virtual void * __thiscall 
> >xercesc_2_7::LocalFileFormatTarget::`scalar deleting 
> >destructor'(unsigned int)" 
> >(??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol 
> >?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned 
> >short
>const
> >* __thiscall xercesc_2_7::XMLException::getMessage(void)const ) 
> >imported in function $L79627
> >
> >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: 
> >unresolved external symbol ___mb_cur_max .\Debug/dmpmain.exe : fatal 
> >error LNK1120: 1 unresolved externals
> >
> >Build log was saved at
> "<<file://d:\EigeneDaten\Visual>file://d:\EigeneDaten\Visual
>  >Studio>file://d:\EigeneDaten\Visual Studio
> >Projects\xml\dmpmain\Debug\BuildLog.htm"
> >dmpmain - 2 error(s), 17 warning(s)
> >---------------------- Done ----------------------
> >
> >     Rebuild All: 0 succeeded, 1 failed, 0 skipped
> >---------------SNIP------------------------
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: AW: Linking with static library - Linking errors and unresolved external

Posted by Alberto Massari <am...@datadirect.com>.
Oh, yes; you also need to switch to the static C runtime library:
- in the project property dialog, click on the 
C/C++ folder, then on "Code Generation"
- in the Runtime Library field, select 
"Multi-threaded Debug (/MTd)" for the Debug 
build, and "Multi-threaded (/MT)" for the Release build.

Alberto

At 12.51 14/09/2005 +0200, Joerg Toellner wrote:
>Dear Alberto,
>
>Thank you very much. It worked so far, b I did this before, but somehow i've
>read in the mailinglist-archive that i have to add the Macro
>XERCES_STATIC_LIBRARY (instead of the XML_LIBRARY).
>
>Now the warnings are all gone. But i still have the unresolved external
>error like this:
>
>Linking...
>Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: unresolved
>external symbol ___mb_cur_max
>.\Debug/dmpmain.exe : fatal error LNK1120: 1 unresolved externals
>
>With the dll-variant this error is not occuring.
>
>Any hint for this last problem for me too? I will be very glad if you can
>afford one more helping hand.
>
>TIA again
>Joerg
>
>-----Ursprüngliche Nachricht-----
>Von: Alberto Massari [mailto:amassari@datadirect.com]
>Gesendet: Mittwoch, 14. September 2005 11:43
>An: c-dev@xerces.apache.org
>Betreff: Re: Linking with static library - Linking errors and unresolved
>external
>
>Hi Joerg,
>
>At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
> >[..]
> >I'm not very good in playing with compiler options. So i'm now stuck
> >and helpless. Would please anybody enlighten me a little bit so i'm
> >able to link the xerces-libraries statically in my app? What i have
> >exactly to do (step by step for lamers like me if possible) to get it to
>work?
>
>Just do this:
>- right click on the project entry in the "Solution Explorer" and select
>"Properties"
>- click on the C++ folder on the left, then on the "Preprocessor" entry
>- click on the "Preprocessor Definitions", then on the [...] button
>- add the macro XML_LIBRARY to the list
>- click OK to close the macro definition dialog
>- repeat the steps also for the Release build configuration
>- click OK to close the properties dialog
>
>Alberto
>
>P.S. For the ones who want to do the same with the unreleased Xerces 3.0
>code base, the macro has been changed into XERCES_STATIC_LIBRARY
>
>
> >TIA veeeery much for any hint
> >Joerg Toellner
> >
> >Following my warnings and error messages:
> >
> >---------------SNIP------------------------
> >Linking...
> >dmpmainFrm.obj : warning LNK4049: locally defined symbol
> >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
> >(public: static class xercesc_2_7::MemoryManager *
> >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> >
> >xmldom.obj : warning LNK4049: locally defined symbol
> >?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
> >(public: static class xercesc_2_7::MemoryManager *
> >xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
> >
> >dmpmainFrm.obj : warning LNK4217: locally defined symbol
> >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned short
> >* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported
>in
> >function "public: __thiscall XERCES_C2X::XERCES_C2X(char const * const)"
> >(??0XERCES_C2X@@QAE@QBD@Z)
> >
> >xmldom.obj : warning LNK4049: locally defined symbol
> >?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned short
> >* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported
> >
> >dmpmainFrm.obj : warning LNK4217: locally defined symbol
> >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void __cdecl
> >xercesc_2_7::XMLString::release(unsigned short * *)) imported in function
> >"public: __thiscall XERCES_C2X::~XERCES_C2X(void)" (??1XERCES_C2X@@QAE@XZ)
> >
> >xmldom.obj : warning LNK4049: locally defined symbol
> >?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void __cdecl
> >xercesc_2_7::XMLString::release(unsigned short * *)) imported
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPAVDOMImplem
>e
> >ntation@2@PBG@Z (public: static class xercesc_2_7::DOMImplementation *
> >__cdecl
> >xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsigned short
> >const *)) imported in function "class xercesc_2_7::DOMImplementation *
> >__cdecl dom_Init(void)" (?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@2@QAVMemor
>y
> >Manager@2@_N@Z (public: static void __cdecl
> >xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char const *
> >const,class xercesc_2_7::PanicHandler * const,class
> >xercesc_2_7::MemoryManager * const,bool)) imported in function "class
> >xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
> >(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
> >
> >xmldom.obj : warning LNK4049: locally defined symbol
> >?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static char
>const
> >* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static void __cdecl
> >xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in function "void
> >__cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char * __cdecl
> >xercesc_2_7::XMLString::transcode(unsigned short const * const)) imported
>in
> >function $L79627
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void __cdecl
> >xercesc_2_7::XMLString::release(char * *)) imported in function $L79627
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl
> >xercesc_2_7::XMemory::operator delete(void *)) imported in function $L79584
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@Z (public:
> >__thiscall xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
> >const * const,class xercesc_2_7::MemoryManager * const)) imported in
> >function "void __cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation
> >*,class xercesc_2_7::DOMDocument *,char *)"
> >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2@PAD@Z
>)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl
> >xercesc_2_7::XMemory::operator new(unsigned int)) imported in function
>"void
> >__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class
> >xercesc_2_7::DOMDocument *,char *)"
> >(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2@PAD@Z
>)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual __thiscall
> >xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void)) imported
> >in function "public: virtual void * __thiscall
> >xercesc_2_7::LocalFileFormatTarget::`scalar deleting destructor'(unsigned
> >int)" (??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
> >
> >xmldom.obj : warning LNK4217: locally defined symbol
> >?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned short
>const
> >* __thiscall xercesc_2_7::XMLException::getMessage(void)const ) imported in
> >function $L79627
> >
> >Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: unresolved
> >external symbol ___mb_cur_max
> >.\Debug/dmpmain.exe : fatal error LNK1120: 1 unresolved externals
> >
> >Build log was saved at 
> "<<file://d:\EigeneDaten\Visual>file://d:\EigeneDaten\Visual  
>  >Studio>file://d:\EigeneDaten\Visual Studio
> >Projects\xml\dmpmain\Debug\BuildLog.htm"
> >dmpmain - 2 error(s), 17 warning(s)
> >---------------------- Done ----------------------
> >
> >     Rebuild All: 0 succeeded, 1 failed, 0 skipped
> >---------------SNIP------------------------
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> >For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


AW: Linking with static library - Linking errors and unresolved external

Posted by Joerg Toellner <to...@oss-gmbh.de>.
Dear Alberto,

Thank you very much. It worked so far, b I did this before, but somehow i've
read in the mailinglist-archive that i have to add the Macro
XERCES_STATIC_LIBRARY (instead of the XML_LIBRARY).

Now the warnings are all gone. But i still have the unresolved external
error like this:

Linking...
Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: unresolved
external symbol ___mb_cur_max
.\Debug/dmpmain.exe : fatal error LNK1120: 1 unresolved externals

With the dll-variant this error is not occuring.

Any hint for this last problem for me too? I will be very glad if you can
afford one more helping hand. 

TIA again
Joerg

-----Ursprüngliche Nachricht-----
Von: Alberto Massari [mailto:amassari@datadirect.com] 
Gesendet: Mittwoch, 14. September 2005 11:43
An: c-dev@xerces.apache.org
Betreff: Re: Linking with static library - Linking errors and unresolved
external

Hi Joerg,

At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
>[..]
>I'm not very good in playing with compiler options. So i'm now stuck 
>and helpless. Would please anybody enlighten me a little bit so i'm 
>able to link the xerces-libraries statically in my app? What i have 
>exactly to do (step by step for lamers like me if possible) to get it to
work?

Just do this:
- right click on the project entry in the "Solution Explorer" and select
"Properties"
- click on the C++ folder on the left, then on the "Preprocessor" entry
- click on the "Preprocessor Definitions", then on the [...] button
- add the macro XML_LIBRARY to the list
- click OK to close the macro definition dialog
- repeat the steps also for the Release build configuration
- click OK to close the properties dialog

Alberto

P.S. For the ones who want to do the same with the unreleased Xerces 3.0
code base, the macro has been changed into XERCES_STATIC_LIBRARY


>TIA veeeery much for any hint
>Joerg Toellner
>
>Following my warnings and error messages:
>
>---------------SNIP------------------------
>Linking...
>dmpmainFrm.obj : warning LNK4049: locally defined symbol
>?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
>(public: static class xercesc_2_7::MemoryManager *
>xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
>
>xmldom.obj : warning LNK4049: locally defined symbol
>?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
>(public: static class xercesc_2_7::MemoryManager *
>xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
>
>dmpmainFrm.obj : warning LNK4217: locally defined symbol
>?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned short
>* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported
in
>function "public: __thiscall XERCES_C2X::XERCES_C2X(char const * const)"
>(??0XERCES_C2X@@QAE@QBD@Z)
>
>xmldom.obj : warning LNK4049: locally defined symbol
>?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned short
>* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported
>
>dmpmainFrm.obj : warning LNK4217: locally defined symbol
>?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void __cdecl
>xercesc_2_7::XMLString::release(unsigned short * *)) imported in function
>"public: __thiscall XERCES_C2X::~XERCES_C2X(void)" (??1XERCES_C2X@@QAE@XZ)
>
>xmldom.obj : warning LNK4049: locally defined symbol
>?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void __cdecl
>xercesc_2_7::XMLString::release(unsigned short * *)) imported
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPAVDOMImplem
e
>ntation@2@PBG@Z (public: static class xercesc_2_7::DOMImplementation *
>__cdecl
>xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsigned short
>const *)) imported in function "class xercesc_2_7::DOMImplementation *
>__cdecl dom_Init(void)" (?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@2@QAVMemor
y
>Manager@2@_N@Z (public: static void __cdecl
>xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char const *
>const,class xercesc_2_7::PanicHandler * const,class
>xercesc_2_7::MemoryManager * const,bool)) imported in function "class
>xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
>(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
>
>xmldom.obj : warning LNK4049: locally defined symbol
>?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static char
const
>* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static void __cdecl
>xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in function "void
>__cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char * __cdecl
>xercesc_2_7::XMLString::transcode(unsigned short const * const)) imported
in
>function $L79627
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void __cdecl
>xercesc_2_7::XMLString::release(char * *)) imported in function $L79627
>
>xmldom.obj : warning LNK4217: locally defined symbol
>??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl
>xercesc_2_7::XMemory::operator delete(void *)) imported in function $L79584
>
>xmldom.obj : warning LNK4217: locally defined symbol
>??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@Z (public:
>__thiscall xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
>const * const,class xercesc_2_7::MemoryManager * const)) imported in
>function "void __cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation
>*,class xercesc_2_7::DOMDocument *,char *)"
>(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2@PAD@Z
)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl
>xercesc_2_7::XMemory::operator new(unsigned int)) imported in function
"void
>__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class
>xercesc_2_7::DOMDocument *,char *)"
>(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2@PAD@Z
)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual __thiscall
>xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void)) imported
>in function "public: virtual void * __thiscall
>xercesc_2_7::LocalFileFormatTarget::`scalar deleting destructor'(unsigned
>int)" (??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned short
const
>* __thiscall xercesc_2_7::XMLException::getMessage(void)const ) imported in
>function $L79627
>
>Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: unresolved
>external symbol ___mb_cur_max
>.\Debug/dmpmain.exe : fatal error LNK1120: 1 unresolved externals
>
>Build log was saved at "<file://d:\EigeneDaten\Visual 
>Studio>file://d:\EigeneDaten\Visual Studio
>Projects\xml\dmpmain\Debug\BuildLog.htm"
>dmpmain - 2 error(s), 17 warning(s)
>---------------------- Done ----------------------
>
>     Rebuild All: 0 succeeded, 1 failed, 0 skipped
>---------------SNIP------------------------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Linking with static library - Linking errors and unresolved external

Posted by Alberto Massari <am...@datadirect.com>.
Hi Joerg,

At 10.44 14/09/2005 +0200, Joerg Toellner wrote:
>[..]
>I'm not very good in playing with compiler options. So i'm now stuck and
>helpless. Would please anybody enlighten me a little bit so i'm able to link
>the xerces-libraries statically in my app? What i have exactly to do (step
>by step for lamers like me if possible) to get it to work?

Just do this:
- right click on the project entry in the "Solution Explorer" and 
select "Properties"
- click on the C++ folder on the left, then on the "Preprocessor" entry
- click on the "Preprocessor Definitions", then on the [...] button
- add the macro XML_LIBRARY to the list
- click OK to close the macro definition dialog
- repeat the steps also for the Release build configuration
- click OK to close the properties dialog

Alberto

P.S. For the ones who want to do the same with the unreleased Xerces 
3.0 code base, the macro has been changed into XERCES_STATIC_LIBRARY


>TIA veeeery much for any hint
>Joerg Toellner
>
>Following my warnings and error messages:
>
>---------------SNIP------------------------
>Linking...
>dmpmainFrm.obj : warning LNK4049: locally defined symbol
>?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
>(public: static class xercesc_2_7::MemoryManager *
>xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
>
>xmldom.obj : warning LNK4049: locally defined symbol
>?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
>(public: static class xercesc_2_7::MemoryManager *
>xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported
>
>dmpmainFrm.obj : warning LNK4217: locally defined symbol
>?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned short
>* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported in
>function "public: __thiscall XERCES_C2X::XERCES_C2X(char const * const)"
>(??0XERCES_C2X@@QAE@QBD@Z)
>
>xmldom.obj : warning LNK4049: locally defined symbol
>?transcode@XMLString@xercesc_2_7@@SAPAGQBD@Z (public: static unsigned short
>* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported
>
>dmpmainFrm.obj : warning LNK4217: locally defined symbol
>?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void __cdecl
>xercesc_2_7::XMLString::release(unsigned short * *)) imported in function
>"public: __thiscall XERCES_C2X::~XERCES_C2X(void)" (??1XERCES_C2X@@QAE@XZ)
>
>xmldom.obj : warning LNK4049: locally defined symbol
>?release@XMLString@xercesc_2_7@@SAXPAPAG@Z (public: static void __cdecl
>xercesc_2_7::XMLString::release(unsigned short * *)) imported
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPAVDOMImpleme
>ntation@2@PBG@Z (public: static class xercesc_2_7::DOMImplementation *
>__cdecl
>xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsigned short
>const *)) imported in function "class xercesc_2_7::DOMImplementation *
>__cdecl dom_Init(void)" (?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?Initialize@XMLPlatformUtils@xercesc_2_7@@SAXQBD0QAVPanicHandler@2@QAVMemory
>Manager@2@_N@Z (public: static void __cdecl
>xercesc_2_7::XMLPlatformUtils::Initialize(char const * const,char const *
>const,class xercesc_2_7::PanicHandler * const,class
>xercesc_2_7::MemoryManager * const,bool)) imported in function "class
>xercesc_2_7::DOMImplementation * __cdecl dom_Init(void)"
>(?dom_Init@@YAPAVDOMImplementation@xercesc_2_7@@XZ)
>
>xmldom.obj : warning LNK4049: locally defined symbol
>?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB (public: static char const
>* const xercesc_2_7::XMLUni::fgXercescDefaultLocale) imported
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?Terminate@XMLPlatformUtils@xercesc_2_7@@SAXXZ (public: static void __cdecl
>xercesc_2_7::XMLPlatformUtils::Terminate(void)) imported in function "void
>__cdecl dom_DeInit(void)" (?dom_DeInit@@YAXXZ)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?transcode@XMLString@xercesc_2_7@@SAPADQBG@Z (public: static char * __cdecl
>xercesc_2_7::XMLString::transcode(unsigned short const * const)) imported in
>function $L79627
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?release@XMLString@xercesc_2_7@@SAXPAPAD@Z (public: static void __cdecl
>xercesc_2_7::XMLString::release(char * *)) imported in function $L79627
>
>xmldom.obj : warning LNK4217: locally defined symbol
>??3XMemory@xercesc_2_7@@SAXPAX@Z (public: static void __cdecl
>xercesc_2_7::XMemory::operator delete(void *)) imported in function $L79584
>
>xmldom.obj : warning LNK4217: locally defined symbol
>??0LocalFileFormatTarget@xercesc_2_7@@QAE@QBDQAVMemoryManager@1@@Z (public:
>__thiscall xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(char
>const * const,class xercesc_2_7::MemoryManager * const)) imported in
>function "void __cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation
>*,class xercesc_2_7::DOMDocument *,char *)"
>(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2@PAD@Z)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>??2XMemory@xercesc_2_7@@SAPAXI@Z (public: static void * __cdecl
>xercesc_2_7::XMemory::operator new(unsigned int)) imported in function "void
>__cdecl dom_WriteDoc(class xercesc_2_7::DOMImplementation *,class
>xercesc_2_7::DOMDocument *,char *)"
>(?dom_WriteDoc@@YAXPAVDOMImplementation@xercesc_2_7@@PAVDOMDocument@2@PAD@Z)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>??1LocalFileFormatTarget@xercesc_2_7@@UAE@XZ (public: virtual __thiscall
>xercesc_2_7::LocalFileFormatTarget::~LocalFileFormatTarget(void)) imported
>in function "public: virtual void * __thiscall
>xercesc_2_7::LocalFileFormatTarget::`scalar deleting destructor'(unsigned
>int)" (??_GLocalFileFormatTarget@xercesc_2_7@@UAEPAXI@Z)
>
>xmldom.obj : warning LNK4217: locally defined symbol
>?getMessage@XMLException@xercesc_2_7@@QBEPBGXZ (public: unsigned short const
>* __thiscall xercesc_2_7::XMLException::getMessage(void)const ) imported in
>function $L79627
>
>Xerces-c_static_2D.lib(Win32TransService.obj) : error LNK2001: unresolved
>external symbol ___mb_cur_max
>.\Debug/dmpmain.exe : fatal error LNK1120: 1 unresolved externals
>
>Build log was saved at "<file://d:\EigeneDaten\Visual 
>Studio>file://d:\EigeneDaten\Visual Studio
>Projects\xml\dmpmain\Debug\BuildLog.htm"
>dmpmain - 2 error(s), 17 warning(s)
>---------------------- Done ----------------------
>
>     Rebuild All: 0 succeeded, 1 failed, 0 skipped
>---------------SNIP------------------------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org