我试图在项目中将xerces
library 用作静态库。但是得到两个未解决的符号。由于我可以重建库,所以您知道如何导出这些库吗?
两个未解析的外部符号是
xercesc_3_1::DOMErrorHandler::DOMErrorHandler(void)
和xercesc_3_1::Wrapper4InputSource::Wrapper4InputSource
helloworld.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) protected: __thiscall xercesc_3_1::DOMErrorHandler::DOMErrorHandler(void)" (__imp_??0DOMErrorHandler@xercesc_3_1@@IAE@XZ) referenced in function "public: __thiscall xsd::cxx::xml::dom::bits::error_handler_proxy<char>::error_handler_proxy<char>(class xsd::cxx::xml::error_handler<char> &)" (??0?$error_handler_proxy@D@bits@dom@xml@cxx@xsd@@QAE@AAV?$error_handler@D@345@@Z)
helloworld.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall xercesc_3_1::Wrapper4InputSource::Wrapper4InputSource(class xercesc_3_1::InputSource * const,bool,class xercesc_3_1::MemoryManager * const)" (__imp_??0Wrapper4InputSource@xercesc_3_1@@QAE@QAVInputSource@1@_NQAVMemoryManager@1@@Z) referenced in function "class std::unique_ptr<class xercesc_3_1::DOMDocument,struct xsd::cxx::xml::dom::deleter<class xercesc_3_1::DOMDocument> > __cdecl xsd::cxx::xml::dom::parse<char>(class xercesc_3_1::InputSource &,class xercesc_3_1::DOMErrorHandler &,class xsd::cxx::xml::properties<char> const &,unsigned long)" (??$parse@D@dom@xml@cxx@xsd@@YA?AV?$unique_ptr@VDOMDocument@xercesc_3_1@@U?$deleter@VDOMDocument@xercesc_3_1@@@dom@xml@cxx@xsd@@@std@@AAVInputSource@xercesc_3_1@@AAVDOMErrorHandler@7@ABV?$properties@D@123@K@Z)