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

obj : error LNK2019: 无法解析的外部符号 "declspec(dllimport) public:解决思路

2012-02-25 
obj : error LNK2019: 无法解析的外部符号 __declspec(dllimport) public:我用了xerces-c_2_8_0,写了个例

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个选项都试试
[解决办法]

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

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

[解决办法]
探讨
问题解决了,是需要添加依赖项,还是谢谢cphj

[解决办法]
探讨
引用:
问题解决了,是需要添加依赖项,还是谢谢cphj


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

热点排行