日期:2014-05-16  浏览次数:20652 次

error LNK2001: unresolved external symbol 求助
编译时出现错误如下,可能是什么原因?我用的vs2008编译的。库明明引用了,但还报错.

1>libprotobuf.lib(message.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>libprotobuf.lib(strutil.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)


------解决方案--------------------
windows 平台?
------解决方案--------------------
表示 这些符号找不到
情况一:那些函数所在的文件没有编译进来。。。
情况二:那些函数所在的库没有连接进来。。。

一般都是这两种情况
------解决方案--------------------
到各个系统自身的include目录里 用 grep "__declspec" 目录 -R 去看看到底是哪个字符串没定义。找到没定义的字符串,到网上去查这个字符串包含在什么.h文件里,就知道到底是什么原因造成的了。
------解决方案--------------------
探讨
表示 这些符号找不到
情况一:那些函数所在的文件没有编译进来。。。
情况二:那些函数所在的库没有连接进来。。。

一般都是这两种情况