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
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED]@A
(public: static class xercesc_2_7::MemoryManager *
xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported

xmldom.obj : warning LNK4049: locally defined symbol
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED]@A
(public: static class xercesc_2_7::MemoryManager *
xercesc_2_7::XMLPlatformUtils::fgMemoryManager) imported

dmpmainFrm.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED] (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@@[EMAIL PROTECTED]@Z)

xmldom.obj : warning LNK4049: locally defined symbol
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED] (public: static unsigned short
* __cdecl xercesc_2_7::XMLString::transcode(char const * const)) imported

dmpmainFrm.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED] (public: static void __cdecl
xercesc_2_7::XMLString::release(unsigned short * *)) imported in function
"public: __thiscall XERCES_C2X::~XERCES_C2X(void)" (??1XERCES_C2X@@[EMAIL 
PROTECTED])

xmldom.obj : warning LNK4049: locally defined symbol
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED] (public: static void __cdecl
xercesc_2_7::XMLString::release(unsigned short * *)) imported

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@xercesc_2_7@@SAPAVDOMImpleme
[EMAIL PROTECTED]@[EMAIL PROTECTED] (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@@[EMAIL PROTECTED]@@XZ)

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED]@QAVMemory
[EMAIL PROTECTED]@[EMAIL PROTECTED] (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@@[EMAIL PROTECTED]@@XZ)

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

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@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
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED] (public: static char * __cdecl
xercesc_2_7::XMLString::transcode(unsigned short const * const)) imported in
function $L79627

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED] (public: static void __cdecl
xercesc_2_7::XMLString::release(char * *)) imported in function $L79627

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@@[EMAIL PROTECTED] (public: static void __cdecl
xercesc_2_7::XMemory::operator delete(void *)) imported in function $L79584

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@@[EMAIL PROTECTED]@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@@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED])

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@@[EMAIL PROTECTED] (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@@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED])

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@@[EMAIL PROTECTED] (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)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])

xmldom.obj : warning LNK4217: locally defined symbol
[EMAIL PROTECTED]@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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to