首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

obj : error LNK2019: 没法解析的外部符号 "declspec(dllimport) public

2013-01-06 
obj : error LNK2019: 无法解析的外部符号 __declspec(dllimport) public:本帖最后由 doubles 于 2009-10

obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public:
本帖最后由 doubles 于 2009-10-19 11:26:49 编辑 我用了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个选项都试试
[解决办法]

引用:
编译的运行时库类型错了吧,换成其他的选项试试

工程属性->配置属性->C/C++->代码生成->运行时库,4个选项都试试

摆明了没有连接dll,不是你说的
[解决办法]
引用:
问题解决了,是需要添加依赖项,还是谢谢cphj


那就还是添加库文件问题吧?
[解决办法]
引用:
引用:
问题解决了,是需要添加依赖项,还是谢谢cphj


那就还是添加库文件问题吧?

应该是link->input里添加xerces对应的lib文件

热点排行