ERROR1:xxx .exe 已触发了一个断点。
EIGEN_USING_STD(free)
free(ptr);
解决办法:项目属性->C/C++->代码生成->启用增强指令集->选择高级矢量扩展(/arch:AVX)
ERROR2:error C2664: 无法将参数 1 从“std::shared_ptr<pcl::PointCloud<pcl::PointXYZ>>”转换为“boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ>> &”
解决办法:boost::shared_ptr改成std::shared_ptr
ERROR3:pcl1.12.1编译错误
解决办法:屏蔽头文件:#include <pcl/io/io.h>
ERROR:4:params.h(44): message : 参见“flann_algorithm_t”的声明
解决办法:调整头pcl和opencv文件位置或者属性列表位置
ERROR5:“CV_RGB2BGR”: 未声明的标识符
解决办法:添加头文件: #include "opencv2/imgproc/types_c.h"
ERROR6: pcl 1.12 ia_fpcs.hpp文件中 #pragma omp flush(abort) 报错
解决办法:将#pragma omp flush(abort) 注释掉
ERROR7: VS工具集为v141_xp时,编译会报错error C2760:语法错误: 意外的令牌“标识符”,预期的令牌为“类型说明符”
解决办法:
C/C++ -> 语言 -> 符合模式,修改为否
ERROR8: 无法解析外部不符号 。。。。。。"public: __cdecl google::FlagRegisterer::FlagRegisterer<int>(char const *,char const *,char const *,int *,int *)"
解决办法:添加 gflags_static.lib 与其路径
ERROR9:在使用gflags库时,生成提示错误:
gflags.lib(gflags.obj) : error LNK2001: unresolved external symbol __imp__PathMatchSpecA
解决办法:项目属性 -》链接器-》输入-》附加依赖项-》加上shlwapi.lib
ERROR10: LNK2001 无法解析的外部符号 "__declspec(dllimport) public: __cdecl google::LogMessage::LogMessage(char const *,int)" (__imp_??0LogMessage@google@@QEAA@PEBDH@Z) InventRobot ******serial_device.obj 1
解决方案:
工程-》属性-C/C++-》预处理器定义加上
GOOGLE_GLOG_DLL_DECL=
ERROR10: fatal error LNK1318: 非意外的 PDB 错误: OK (0)“”
解决办法:链接器-->调试-->生成调试信息-->设置为否
ERROR11:找不到 #include<pthread.h>
解决办法:在POSIX Threads for Windows download | SourceForge.net网站中压缩包下载。解压rebuilt后-》在工程中配置pthread。
ERROR11:windows cmake编译时出现 :Could not find a package configuration file provided by "OpenCV" with any of the following names: OpenCVConfig.cmake opencv-config.cmake
解决办法:在OpenCV_DIR 后加上路径: D:/Automation/VS2019/OpenCV/opencv/build。或者,找到xxxx.cmake然后将路径设置到cmakelists中 例如,
set(OpenCV_DIR "D:/Automation/VS2019/OpenCV/opencv/build")
ERROR12:由于找不到 xxx.dll, 无法继续执行代码
解决办法:此电脑->属性->高级系统设置->环境变量->系统变量->Path->编辑->新建->添加dll所有的目录。重启计算机才会生效
ERROR12:
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2001 无法解析的外部符号 "bool __cdecl cv::imwrite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<int,class std::allocator<int> > const &)" (?imwrite@cv@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV_InputArray@debug_build_guard@1@AEBV?$vector@HV?$allocator@H@std@@@3@@Z) onlinefusion E:\WorkSpace\_PolyMesh\myCode\TSDF_MC_CPU\FastFusion\fastfusion_vs2019\Project\geometryfusion_aos.lib(mesh_interleaved.obj) 1
解决方案:
右键 geometryfusion_aos 工程->属性-C/C++->预处理器定义:CV_IGNORE_DEBUG_BUILD_GUARD
ERROR13:
error C2760 : 语法错误: 意外标记 "标识符",应为 ";"
error C3861 : “EIGEN_USING_STD_MATH”: 找不到标识符
解决方案:Eigen库有问题,更换Eigen库。
ERROR14:VS2019 无法启动程序xxx,xxx 不是有效的win32程序
解决方法:右键main函数所在项目-》设置为启动项目