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:\Programs\Fusion\Fusion.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:\Programs\Fusion\GarmentReconstructor.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:\Programs\Fusion\TsdfVolume.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:\Programs\Fusion\Fusion.obj Fusion

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

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

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

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

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

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值