【点云处理】PCL点云库使用报错汇总

1、vtk无法解析的外部符号

之前由于工作原因,所以在vs2015下重新配置了PCL点云库,今天在使用库中vtk函数的时候出现了如下错误:

无法解析的外部符号 "public: __cdecl vtkDebugLeaksManager::vtkDebugLeaksManag~~~~~~~~~~~~~~~~~~~~~

 根据错误也在网上找了一些解决办法,比如在程序开头加上vtk的一些头文件,但这样使相同错误越来越多。

从报错原因看出,错误根源应该是vtk第三方库出现了配置错误。

解决办法:

像刚开始配置文件一样,找到项目属性的附加依赖库(是vtk中的lib文件添加错误),将自己版本pcl中的vtk库中的以lib为结尾的文件添加到附加依赖库中,由于文件较多,所以逐个粘贴复制是不太可能的,网上也搜到了快速找到lib文件名的方法,很实用。

在D:\PCL\PCL 1.8.1\3rdParty\VTK\lib文件下新建文本文档,文档中添加以下内容:

@echo off
for %%I in (*.lib) do echo %%I>>all.txt
for %%I in (*debug.lib) do echo %%I>>adebug.txt
for %%I in (*release.lib) do echo %%I>>arelease.txt
pause

添加结束后,将后缀名.txt改为.bat ,然后双击该文件,执行结束后,文件夹中便出现新的 all.txt文件,里面便是我们寻找的.lib文件名了,将找到的文件名添加到附加依赖项之中,重新运行程序,顺利编译。

2、 错误 C4996 'pcl::visualization::PointCloudColorHandler<PointT>::getColor': use getColor() without parameters instead 

之前网上搜索了很多教程,但最终都没有解决这个问题,最后问了同事,解决方法:

在程序开头加上 #pragma warning(disable:4996)

3、 错误 LNK2001 无法解析的外部符号 "void __cdecl boost::filesystem::path_traits::convert(char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,class std::codecvt<wchar_t,char,struct _Mbstatet> const &)" (?convert@path_traits@filesystem@boost@@YAXPEBD0AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEBV?$codecvt@_WDU_Mbstatet@@@5@@Z) 

 因公司开发环境需要 配置VS2019 + PCL1.10.1

配置环境中boost库没有配置成功

debug

libboost_atomic-vc142-mt-gd-x64-1_72.lib
libboost_bzip2-vc142-mt-gd-x64-1_72.lib
libboost_chrono-vc142-mt-gd-x64-1_72.lib
libboost_container-vc142-mt-gd-x64-1_72.lib
libboost_context-vc142-mt-gd-x64-1_72.lib
libboost_contract-vc142-mt-gd-x64-1_72.lib
libboost_coroutine-vc142-mt-gd-x64-1_72.lib
libboost_date_time-vc142-mt-gd-x64-1_72.lib
libboost_exception-vc142-mt-gd-x64-1_72.lib
libboost_fiber-vc142-mt-gd-x64-1_72.lib
libboost_filesystem-vc142-mt-gd-x64-1_72.lib
libboost_graph_parallel-vc142-mt-gd-x64-1_72.lib
libboost_graph-vc142-mt-gd-x64-1_72.lib
libboost_iostreams-vc142-mt-gd-x64-1_72.lib
libboost_locale-vc142-mt-gd-x64-1_72.lib
libboost_log_setup-vc142-mt-gd-x64-1_72.lib
libboost_log-vc142-mt-gd-x64-1_72.lib
libboost_math_c99f-vc142-mt-gd-x64-1_72.lib
libboost_math_c99l-vc142-mt-gd-x64-1_72.lib
libboost_math_c99-vc142-mt-gd-x64-1_72.lib
libboost_math_tr1f-vc142-mt-gd-x64-1_72.lib
libboost_math_tr1l-vc142-mt-gd-x64-1_72.lib
libboost_math_tr1-vc142-mt-gd-x64-1_72.lib
libboost_mpi-vc142-mt-gd-x64-1_72.lib
libboost_numpy38-vc142-mt-gd-x64-1_72.lib
libboost_prg_exec_monitor-vc142-mt-gd-x64-1_72.lib
libboost_program_options-vc142-mt-gd-x64-1_72.lib
libboost_python38-vc142-mt-gd-x64-1_72.lib
libboost_random-vc142-mt-gd-x64-1_72.lib
libboost_regex-vc142-mt-gd-x64-1_72.lib
libboost_serialization-vc142-mt-gd-x64-1_72.lib
libboost_stacktrace_noop-vc142-mt-gd-x64-1_72.lib
libboost_stacktrace_windbg_cached-vc142-mt-gd-x64-1_72.lib
libboost_stacktrace_windbg-vc142-mt-gd-x64-1_72.lib
libboost_system-vc142-mt-gd-x64-1_72.lib
libboost_test_exec_monitor-vc142-mt-gd-x64-1_72.lib	
libboost_thread-vc142-mt-gd-x64-1_72.lib
libboost_timer-vc142-mt-gd-x64-1_72.lib
libboost_type_erasure-vc142-mt-gd-x64-1_72.lib
libboost_unit_test_framework-vc142-mt-gd-x64-1_72.lib
libboost_wave-vc142-mt-gd-x64-1_72.lib
libboost_wserialization-vc142-mt-gd-x64-1_72.lib
libboost_zlib-vc142-mt-gd-x64-1_72.lib

release 

libboost_atomic-vc142-mt-x64-1_72.lib
libboost_bzip2-vc142-mt-x64-1_72.lib
libboost_chrono-vc142-mt-x64-1_72.lib
libboost_container-vc142-mt-x64-1_72.lib
libboost_context-vc142-mt-x64-1_72.lib
libboost_contract-vc142-mt-x64-1_72.lib
libboost_coroutine-vc142-mt-x64-1_72.lib
libboost_date_time-vc142-mt-x64-1_72.lib
libboost_exception-vc142-mt-x64-1_72.lib
libboost_fiber-vc142-mt-x64-1_72.lib
libboost_filesystem-vc142-mt-x64-1_72.lib
libboost_graph_parallel-vc142-mt-x64-1_72.lib
libboost_graph-vc142-mt-x64-1_72.lib
libboost_iostreams-vc142-mt-x64-1_72.lib
libboost_locale-vc142-mt-x64-1_72.lib
libboost_log_setup-vc142-mt-x64-1_72.lib
libboost_log-vc142-mt-x64-1_72.lib
libboost_math_c99f-vc142-mt-x64-1_72.lib
libboost_math_c99l-vc142-mt-x64-1_72.lib
libboost_math_c99-vc142-mt-x64-1_72.lib
libboost_math_tr1f-vc142-mt-x64-1_72.lib
libboost_math_tr1l-vc142-mt-x64-1_72.lib
libboost_math_tr1-vc142-mt-x64-1_72.lib
libboost_mpi-vc142-mt-x64-1_72.lib
libboost_numpy38-vc142-mt-x64-1_72.lib
libboost_prg_exec_monitor-vc142-mt-x64-1_72.lib
libboost_program_options-vc142-mt-x64-1_72.lib
libboost_python38-vc142-mt-x64-1_72.lib
libboost_random-vc142-mt-x64-1_72.lib
libboost_regex-vc142-mt-x64-1_72.lib
libboost_serialization-vc142-mt-x64-1_72.lib
libboost_stacktrace_noop-vc142-mt-x64-1_72.lib
libboost_stacktrace_windbg_cached-vc142-mt-x64-1_72.lib
libboost_stacktrace_windbg-vc142-mt-x64-1_72.lib
libboost_system-vc142-mt-x64-1_72.lib
libboost_test_exec_monitor-vc142-mt-x64-1_72.lib	
libboost_thread-vc142-mt-x64-1_72.lib
libboost_timer-vc142-mt-x64-1_72.lib
libboost_type_erasure-vc142-mt-x64-1_72.lib
libboost_unit_test_framework-vc142-mt-x64-1_72.lib
libboost_wave-vc142-mt-x64-1_72.lib
libboost_wserialization-vc142-mt-x64-1_72.lib
libboost_zlib-vc142-mt-x64-1_72.lib

4、检测到~~~与~~~不匹配

解决问题的方法:

在编译生成libcef_dll_wrapper.lib的工程中修改,
在工程上右键-》属性-》c/c++-》代码生成-》运行库
有四个选项及含义分别如下:
多线程调试Dll (/MDd) 对应的是MD_DynamicDebug
多线程Dll (/MD) 对应的是MD_DynamicRelease
多线程(/MT) 对应的是MD_StaticRelease
多线程(/MTd)对应的是MD_StaticDebug
 

 

  • 7
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值