I've tried to link Xalan as static lib, but I got 11 linker errors
(unresolved externals). Linker can't find 11 Xerces
constructors/destructors, that Xalan is using. I'm using Xerces 2.5 with
Xalan 1.6. Does anyone have any idea why this happen? There have to be
some solution... maybe something with namespaces...?

I belive I'll find on this mailing list someone more familiar with
Xerces then I am, who could explain why those few classes (ErrorHandler,
LexicalHandler, DTDHandler, ContentHandler...) and their
ctors/destructors are different then the others.

I'm attaching .txt file with linker output.

Thank you all guys for your help. :>
Milan


> -----Original Message-----
> From: Erik Rydgren [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 13, 2004 10:58 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Linking Xerces C++ statically
> 
> 
> Yes we have done the same thing with Xalan. I can't remember 
> the details anymore but it is very similar to the Xerces conversion.
> 
> Good luck
> / Erik
> 
> > -----Original Message-----
> > From: Milan Tomic [mailto:[EMAIL PROTECTED]
> > Sent: den 12 maj 2004 16:13
> > To: [EMAIL PROTECTED]
> > Subject: RE: Linking Xerces C++ statically
> > 
> > 
> > Thank you. I've succeeded to link Xerces as static lib, but 
> now I need 
> > to link Xalan as static lib, too. Have anyone succeded this 
> using VC6
> or
> > VC7?
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Alberto Massari [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, May 12, 2004 1:20 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: Linking Xerces C++ statically
> > >
> > >
> > > Hi Erik,
> > > if you want to link against the static version of MFC, 
> you need to 
> > > rebuild the Xerces library using the "Debug Multithreaded" and
> > > "Multithreaded"
> > > setting (/MTd and /MT), instead of "Debug Multithreaded DLL" and
> > > "Multithreaded DLL" (/MDd and /MD)
> > >
> > > Alberto
> > >
> > > At 12.12 12/05/2004 +0200, Milan Tomic wrote:
> > > >Erik,
> > > >
> > > >         I did as you said but got some linker errors while
> > > trying to
> > > >use Xerces.lib in my projects:
> > > >
> > > >Linking...
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: _strncmp already defined
> in
> > > >libcmt.lib(strncmp.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: _isspace already defined
> in
> > > >libcmt.lib(_ctype.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: __errno already 
> defined in
> > > >libcmt.lib(dosmap.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: _exit already defined in
> > > >libcmt.lib(crt0dat.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: _atoi already defined in
> > > >libcmt.lib(atox.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: _strchr already 
> defined in
> > > >libcmt.lib(strchr.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: __itoa already 
> defined in
> > > >libcmt.lib(xtoa.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: _localeconv already
> > > defined in
> > > >libcmt.lib(lconv.obj)
> > > >MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall 
> > > >type_info::type_info(class type_info const &)"
> > > >(??0type_info@@[EMAIL PROTECTED]@@Z) already defined in
> > > libcmt.lib(typinfo.obj)
> > > >MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class 
> type_info
> &
> > > >__thiscall type_info::operator=(class type_info const &)"
> > > >(??4type_info@@[EMAIL PROTECTED]@@Z) already defined in
> > > >libcmt.lib(typinfo.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: __stricmp 
> already defined
> in
> > > >libcmt.lib(stricmp.obj)
> > > >MSVCRT.lib(MSVCR71.dll) : error LNK2005: __strnicmp already
> > > defined in
> > > >libcmt.lib(strnicmp.obj)
> > > >LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> > > use of other
> > > >libs; use /NODEFAULTLIB:library Release/XercesTest.exe : fatal
> error
> > > >LNK1169: one or more multiply defined symbols found
> > > >
> > > >The reason for those errors is that I'm using MFC. When I
> > > link them as
> > > >shared lib, there are no errors, but I'd like to link 
> MFC as static 
> > > >lib. Are you using MFC? Is there a hope? Anyone?
> > > >
> > > >Thank you,
> > > >Milan
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Erik Rydgren [mailto:[EMAIL PROTECTED]
> > > > > Sent: Tuesday, February 17, 2004 10:16 AM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: RE: Linking Xerces C++ statically
> > > > >
> > > > >
> > > > > We link Xerces statically with MS devstudio.
> > > > > How to do it:
> > > > >
> > > > > - First change the project type from dll to static lib.
> > > > > - Remove the Win32MsgLoader from the project and add the 
> > > > > InMemMsgLoader instead.
> > > > > - Change the project settings to define
> > > XML_USE_INMEM_MESSAGELOADER
> > > > > instead of USE_WIN32_MESSAGELOADER.
> > > > > - Change the defines for PLATFORM_EXPORT and 
> PLATFORM_IMPORT by 
> > > > > removing the _declspec(dllexport) and _declspec(dllimport)
> > > > > - Rebuild.
> > > > >
> > > > > Hope I didn't forget anything.
> > > > >
> > > > > Good luck
> > > > > Erik Rydgren
> > > > > Aptic AB
> > > > > Sweden
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Chaudhuri, Hiran 
> [mailto:[EMAIL PROTECTED]
> > > > > > Sent: den 16 februari 2004 17:51
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: Linking Xerces C++ statically
> > > > > >
> > > > > > Hi there.
> > > > > >
> > > > > > In the docs it is stated that Xerces C++ requires
> > > > > xerces-2.4.0.dll (on
> > > > > > Windows) to be distributed. Is it possible to have
> > > Xerces linked
> > > > > > statically so I do not need to distribute the DLL?
> > > > > >
> > > > > > Hiran
> > > > > >
> > > > > >
> > > > >
> > > 
> --------------------------------------------------------------------
> > > > > -
> > > > > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > > >
> > > > >
> > > > >
> > > > >
> > > 
> --------------------------------------------------------------------
> > > > > -
> > > > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > > >
> > > >
> > > >
> > > >
> > >
> >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
XalanLib.lib(XercesParserLiaison.obj) : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: virtual __thiscall 
xercesc_2_5::ErrorHandler::~ErrorHandler(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) 
referenced in function "public: virtual __thiscall 
xalanc_1_6::XercesParserLiaison::~XercesParserLiaison(void)" ([EMAIL 
PROTECTED]@@[EMAIL PROTECTED])
XalanLib.lib(XercesParserLiaison.obj) : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: __thiscall 
xercesc_2_5::ErrorHandler::ErrorHandler(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) 
referenced in function "public: __thiscall 
xalanc_1_6::XercesParserLiaison::XercesParserLiaison(class 
xalanc_1_6::XercesDOMSupport &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@1@@Z)
XalanLib.lib(XercesParserLiaison.obj) : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: void __thiscall 
xercesc_2_5::AbstractDOMParser::setExpandEntityReferences(bool)" ([EMAIL 
PROTECTED]@xercesc_2_5@@[EMAIL PROTECTED]) referenced in function "protected: class 
xercesc_2_5::XercesDOMParser * __thiscall 
xalanc_1_6::XercesParserLiaison::CreateDOMParser(void)" ([EMAIL 
PROTECTED]@xalanc_1_6@@[EMAIL PROTECTED]@@XZ)
XalanLib.lib(XalanSourceTreeContentHandler.obj) : error LNK2019: unresolved external 
symbol "__declspec(dllimport) public: virtual __thiscall 
xercesc_2_5::LexicalHandler::~LexicalHandler(void)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]) referenced in function "public: virtual __thiscall 
xalanc_1_6::XalanSourceTreeContentHandler::~XalanSourceTreeContentHandler(void)" 
([EMAIL PROTECTED]@@[EMAIL PROTECTED])
XalanLib.lib(XalanSourceTreeContentHandler.obj) : error LNK2019: unresolved external 
symbol "__declspec(dllimport) public: virtual __thiscall 
xercesc_2_5::DTDHandler::~DTDHandler(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) 
referenced in function "public: virtual __thiscall 
xalanc_1_6::XalanSourceTreeContentHandler::~XalanSourceTreeContentHandler(void)" 
([EMAIL PROTECTED]@@[EMAIL PROTECTED])
XalanLib.lib(XalanSourceTreeContentHandler.obj) : error LNK2019: unresolved external 
symbol "__declspec(dllimport) public: virtual __thiscall 
xercesc_2_5::ContentHandler::~ContentHandler(void)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]) referenced in function "public: virtual __thiscall 
xalanc_1_6::XalanSourceTreeContentHandler::~XalanSourceTreeContentHandler(void)" 
([EMAIL PROTECTED]@@[EMAIL PROTECTED])
XalanLib.lib(XalanSourceTreeContentHandler.obj) : error LNK2019: unresolved external 
symbol "__declspec(dllimport) public: __thiscall 
xercesc_2_5::LexicalHandler::LexicalHandler(void)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]) referenced in function "public: __thiscall 
xalanc_1_6::XalanSourceTreeContentHandler::XalanSourceTreeContentHandler(class 
xalanc_1_6::XalanSourceTreeDocument *,bool)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@Z)
XalanLib.lib(XalanSourceTreeContentHandler.obj) : error LNK2019: unresolved external 
symbol "__declspec(dllimport) public: __thiscall 
xercesc_2_5::DTDHandler::DTDHandler(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) 
referenced in function "public: __thiscall 
xalanc_1_6::XalanSourceTreeContentHandler::XalanSourceTreeContentHandler(class 
xalanc_1_6::XalanSourceTreeDocument *,bool)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@Z)
XalanLib.lib(XalanSourceTreeContentHandler.obj) : error LNK2019: unresolved external 
symbol "__declspec(dllimport) public: __thiscall 
xercesc_2_5::ContentHandler::ContentHandler(void)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]) referenced in function "public: __thiscall 
xalanc_1_6::XalanSourceTreeContentHandler::XalanSourceTreeContentHandler(class 
xalanc_1_6::XalanSourceTreeDocument *,bool)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@Z)
XalanLib.lib(FormatterListener.obj) : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: __thiscall 
xercesc_2_5::DocumentHandler::DocumentHandler(void)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]) referenced in function "public: __thiscall 
xalanc_1_6::FormatterListener::FormatterListener(enum 
xalanc_1_6::FormatterListener::eFormat)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@01@@Z)
XalanLib.lib(FormatterListener.obj) : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: virtual __thiscall 
xercesc_2_5::DocumentHandler::~DocumentHandler(void)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]) referenced in function "public: virtual __thiscall 
xalanc_1_6::FormatterListener::~FormatterListener(void)" ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED])
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to