Title: RE: Static Linking

    Thank you very much Marc for your help about static linking. I've succeeded to link Xerces statically.

    I've tried to link Xalan statically, too, but got about 350 linker errors ("unresolved external"). Something like this:

 
XercesEntityBridge.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xercesc_2_3::DOM_Entity::DOM_Entity(class xercesc_2_3::DOM_Entity const &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@Z)

XercesEntityBridge.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall xercesc_2_3::DOM_Entity::hasChildNodes(void)const " ([EMAIL PROTECTED]@xercesc_2_3@@QBE_NXZ)

XercesEntityBridge.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class xercesc_2_3::DOMString __thiscall xercesc_2_3::DOM_Entity::getPublicId(void)const " ([EMAIL PROTECTED]@xercesc_2_3@@[EMAIL PROTECTED]

@XZ)
XercesEntityBridge.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class xercesc_2_3::DOMString __thiscall xercesc_2_3::DOM_Entity::getSystemId(void)const " ([EMAIL PROTECTED]@xercesc_2_3@@[EMAIL PROTECTED]

    I'm not sure where did compiler found __declspec(dllimport), because I've replaced that with blank space character in (Xalan) VCPPDefinitions.hpp, like this:

#ifdef XALAN_STATIC_LIB
        #define XALAN_PLATFORM_EXPORT
        #define XALAN_PLATFORM_IMPORT
#else
        #define XALAN_PLATFORM_EXPORT     __declspec(dllexport)
        #define XALAN_PLATFORM_IMPORT     __declspec(dllimport)
#endif

    Did anyone succeeded to link Xalan statically? I've posted this question in Xalan mailing list, but nobody answered.

Thank you,
Milan

Reply via email to