obj : error LNK2019: 没法解析的外部符号 "declspec(dllimport) public
obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public:
我用了xerces-c_2_8_0,写了个例子
1>xercesParser.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: static wchar_t const * const xercesc_2_8::XMLUni::fgDOMWRTDiscardDefaultContent" (__imp_?fgDOMWRTDiscardDefaultContent@XMLUni@xercesc_2_8@@2QB_WB)
1>xercesParser.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static void __cdecl xercesc_2_8::XMLPlatformUtils::Terminate(void)" (__imp_?Terminate@XMLPlatformUtils@xercesc_2_8@@SAXXZ),该符号在函数 __catch$?set@XercesParser@@QAE_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@1@Z$0 中被引用
1>xercesParser.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static class xercesc_2_8::DOMImplementation * __cdecl xercesc_2_8::DOMImplementationRegistry::getDOMImplementation(wchar_t const *)" (__imp_?getDOMImplementation@DOMImplementationRegistry@xercesc_2_8@@SAPAVDOMImplementation@2@PB_W@Z),该符号在函数 __catch$?set@XercesParser@@QAE_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@1@Z$0 中被引用
1>F:\exam\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 93 个无法解析的外部命令
报了一大堆错误,可是我在VC++目录中执行文件,引用文件,包含文件,库文件都加入了G:\component\xerces-c_2_8_0的各自路径,请求help!!
------解决方案--------------------
编译的运行时库类型错了吧,换成其他的选项试试
工程属性->配置属性->C/C++->代码生成->运行时库,4个选项都试试
------解决方案--------------------
摆明了没有连接dll,不是你说的
------解决方案--------------------
那就还是添加库文件问题吧?
------解决方案--------------------
应该是link->input里添加xerces对应的lib文件
我用了xerces-c_2_8_0,写了个例子
1>xercesParser.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: static wchar_t const * const xercesc_2_8::XMLUni::fgDOMWRTDiscardDefaultContent" (__imp_?fgDOMWRTDiscardDefaultContent@XMLUni@xercesc_2_8@@2QB_WB)
1>xercesParser.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static void __cdecl xercesc_2_8::XMLPlatformUtils::Terminate(void)" (__imp_?Terminate@XMLPlatformUtils@xercesc_2_8@@SAXXZ),该符号在函数 __catch$?set@XercesParser@@QAE_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@1@Z$0 中被引用
1>xercesParser.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static class xercesc_2_8::DOMImplementation * __cdecl xercesc_2_8::DOMImplementationRegistry::getDOMImplementation(wchar_t const *)" (__imp_?getDOMImplementation@DOMImplementationRegistry@xercesc_2_8@@SAPAVDOMImplementation@2@PB_W@Z),该符号在函数 __catch$?set@XercesParser@@QAE_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@1@Z$0 中被引用
1>F:\exam\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 93 个无法解析的外部命令
报了一大堆错误,可是我在VC++目录中执行文件,引用文件,包含文件,库文件都加入了G:\component\xerces-c_2_8_0的各自路径,请求help!!
------解决方案--------------------
编译的运行时库类型错了吧,换成其他的选项试试
工程属性->配置属性->C/C++->代码生成->运行时库,4个选项都试试
------解决方案--------------------
摆明了没有连接dll,不是你说的
------解决方案--------------------
那就还是添加库文件问题吧?
------解决方案--------------------
应该是link->input里添加xerces对应的lib文件