Linking Xerces 3.1.1 in Windows using Qt Creator 2.4 and Qt 4.8 for MSVC 2008



  • I downloaded xerces for vc2008 and I am trying to use it in a application I am doing with Qt Creator. When I try to link it gives me the following errors.

    XmlParser.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: static char * __cdecl xercesc_3_1::XMLString::transcode(unsigned short const * const,class xercesc_3_1::MemoryManager * const)" (_imp?transcode@XMLString@xercesc_3_1@@SAPADQBGQAVMemoryManager@2@@Z) referenced in function "private: void __thiscall XmlParser::loadParameterType(class xercesc_3_1::DOMElement *)" (?loadParameterType@XmlParser@@AAEXPAVDOMElement@xercesc_3_1@@@Z)

    [...]

    XmlParser.obj:-1: error: LNK2001: unresolved external symbol "public: virtual void __thiscall xercesc_3_1::AbstractDOMParser::endElement(class xercesc_3_1::XMLElementDecl const &,unsigned int,bool,unsigned short const * const)" (?endElement@AbstractDOMParser@xercesc_3_1@@UAEXABVXMLElementDecl@2@I_NQBG@Z)

    and much more.

    I added that library using the wizard "Add Library " -> External Library.

    In my pro. I can see the following:

    win32: LIBS += -L$$PWD/../../libs/xerces-c/3.1.1/lib/ -lxerces-c_3

    INCLUDEPATH += $$PWD/../../libs/xerces-c/3.1.1/include
    DEPENDPATH += $$PWD/../../libs/xerces-c/3.1.1/include

    win32: PRE_TARGETDEPS += $$PWD/../../libs/xerces-c/3.1.1/lib/xerces-c_3.lib

    but it does not work. What am I missing...???

    Thanks in advanced


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.