我是靠谱客的博主 外向短靴,这篇文章主要介绍LNK2019/2001: 无法解析的外部符号的解决方法,现在分享给大家,希望可以做个参考。

在使用PCL库的时候发生了这样的错误:

错误 64 error LNK2019: 无法解析的外部符号 "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@YAXW4VERBOSITY_LEVEL@12@PBDZZ),该符号在函数 "public: void __thiscall pcl::detail::FieldMapper<struct pcl::PointXYZ>::operator()<struct pcl::fields::x>(void)" (??$?RUx@fields@pcl@@@?$FieldMapper@UPointXYZ@pcl@@@detail@pcl@@QAEXXZ) 中被引用 D:ProgramsFusionFusion.obj Fusion

错误 65 error LNK2001: 无法解析的外部符号 "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@YAXW4VERBOSITY_LEVEL@12@PBDZZ) D:ProgramsFusionGarmentReconstructor.obj Fusion

错误 66 error LNK2001: 无法解析的外部符号 "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@YAXW4VERBOSITY_LEVEL@12@PBDZZ) D:ProgramsFusionTsdfVolume.obj Fusion

错误 67 error LNK2019: 无法解析的外部符号 "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ),该符号在函数 "public: __thiscall boost::thread_exception::thread_exception(int,char const *)" (??0thread_exception@boost@@QAE@HPBD@Z) 中被引用 D:ProgramsFusionFusion.obj Fusion

发生这样错误可能的原因:

①正确包含了所需要的头文件(.h文件),但是在源文件(.cpp)中没有相应方法的实现;

②正确包含了头文件(.h文件),但是没有导入相应的库文件(.lib文件);

③导入了库文件(.lib文件),但是库文件的位数和工程的位数不一致。

我就是发生了第三种情况,项目是32位的,但是安装的PCL是64位的。重新安装32位的PCL之后,就不会出现上面的错误了。

最后

以上就是外向短靴最近收集整理的关于LNK2019/2001: 无法解析的外部符号的解决方法的全部内容,更多相关LNK2019/2001:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(61)

评论列表共有 0 条评论

立即
投稿
返回
顶部