解决PCL MLS : error LNK2019; error LNK2001 virtual MovingLeastSquares process performProcessing问题
PCL 基于多项式拟合的法线估计、点云平滑和数据重采样
在使用Window VS2010为开发平台,学习PCL点云库的时候,学到曲面重建(Surface)。在测试下面的程序的时候,遇到了问题。
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/io/io.h>
#include <pcl/io/ply_io.h>
#include <pcl/kdtree/kdtree_flann.h>
#include <pcl/surface/mls.h>
#include <iostream>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/console/print.h>
#include <pcl/console/parse.h>
#include <pcl/console/time.h>
using namespace std;
using namespace pcl;
using namespace pcl::io;
using namespace pcl::console;
int
main (int argc, char** argv)
{
cout << "Project Begin: " << endl;
// Load input file into a PointCloud<T> with an appropriate type
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZRGBA> ());
// Load bun0.pcd -- should be available with the PCL archive in test
pcl::io::loadPCDFile ("pcl_point_cloud/phase2d_1.pcd", *cloud);
cout << "Read .pcd File Final. " << endl;
cout << "This cloud Points number is :" << cloud->points.size() << endl;
// Create a KD-Tree
pcl::search::KdTree<pcl::PointXYZRGBA>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZRGBA>);
// Output has the PointNormal type in order to store the normals calculated by MLS
pcl::PointCloud<pcl::PointXYZRGBNormal> mls_points;
// Init object (second point type is for the normals, even if unused)
pcl::MovingLeastSquares<pcl::PointXYZRGBA, pcl::PointXYZRGBNormal> mls;
mls.setComputeNormals (true);
//Set parameters
mls.setInputCloud(cloud);
mls.setPolynomialFit(true);
mls.setSearchMethod(tree);
mls.setSearchRadius(.1);
TicToc tt;
tt.tic ();
print_highlight ("Processing ");
// Reconstruct
mls.process(mls_points);
print_info ("[done, "); print_value ("%g", tt.toc ()); print_info (" ms]\n");
cout << "Smoothing Processing cloud Points Final." << endl;
std::cout << "After MLS , point cloud size is " << mls_points.size() << std::endl;
// Save output
pcl::io::savePCDFile ("phase2d-mls.pcd", mls_points);
cout << "Save .PCD file Final !" << endl;
cout << "New The New Cloud Points number is : " << mls_points.points.size() << endl;
getchar();
return 0;
}
VS2010编译这段程序的时候,出现了下面的链接错误:
1>Smoothing_Cloud.obj : error LNK2019: 无法解析的外部符号 "public: virtual void __thiscall pcl::MovingLeastSquares<struct pcl::PointXYZRGBA,struct pcl::PointXYZRGBNormal>::process(class pcl::PointCloud<struct pcl::PointXYZRGBNormal> &)" (?process@?$MovingLeastSquares@UPointXYZRGBA@pcl@@UPointXYZRGBNormal@2@@pcl@@UAEXAAV?$PointCloud@UPointXYZRGBNormal@pcl@@@2@@Z),该符号在函数 _main 中被引用
1>Smoothing_Cloud.obj : error LNK2001: 无法解析的外部符号 "private: virtual void __thiscall pcl::MovingLeastSquares<struct pcl::PointXYZRGBA,struct pcl::PointXYZRGBNormal>::performProcessing(class pcl::PointCloud<struct pcl::PointXYZRGBNormal> &)" (?performProcessing@?$MovingLeastSquares@UPointXYZRGBA@pcl@@UPointXYZRGBNormal@2@@pcl@@EAEXAAV?$PointCloud@UPointXYZRGBNormal@pcl@@@2@@Z)
1> fatal error LNK1120: 2 个无法解析的外部命令
1>
1>生成失败。
解决办法:
添加下面这个头文件:
#include <pcl/surface/impl/mls.hpp>
再次编译,问题解决。
参考网站:
http://docs.ros.org/hydro/api/pcl/html/mls_8hpp.html
http://d.hatena.ne.jp/takmin/comment?date=20130719
解决PCL MLS : error LNK2019; error LNK2001 virtual MovingLeastSquares process performProcessing问题的更多相关文章
- error LNK2019: 无法解析的外部符号 __imp___CrtDbgReportW
error LNK2005 and error LNK2019 error LNK2019: unresolved external symbol __imp___CrtDbgReportW refe ...
- error LNK2019: 无法解析的外部符号(编程解决方法)
正在编译...1>Ipv4IPv6traceroutesrc.cpp1>d:\研究生\c++\study\test\test\ipv4ipv6traceroutesrc.cpp(461) ...
- 错误 1 error LNK2019: 无法解析的外部符号 __imp__pthread_create,该符号在函数 _main 中被引用 解决方法
晚上花几分钟在windows下测了下pthread的用法,出现错误 1 error LNK2019: 无法解析的外部符号 __imp__pthread_create,该符号在函数 _main 中被引用 ...
- (obj) error: LNK2019: 无法解析的外部符号解决方法
利用VS2010 C++ 调用 labview生成的动态库编程时无法生成exe 报错信息: Cjj_32.obj : error LNK2019: 无法解析的外部符号 _GetPXIResource@ ...
- 链接报error LNK2019: unresolved external symbol错误,解决
http://blog.163.com/aiding_001/blog/static/22908192011102224344450/ 某次编写一个COM组件,接口定义好之后,增加了ZRX代码后编译链 ...
- “error LNK2019: 无法解析的外部符号”之分析
最近在用VS 2008开发,初学遇到不少问题,最头疼的问题之一就是:LNK2019. 百度一下讲的并不够全面,反正都没解决我的问题. error LNK2019问题在VC 6.0中是error LNK ...
- error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用
MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用 Debug ...
- MSVCRTD.lib(mfc.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainC (转)
一.问题描述 我所使用的编程环境:VS2010 出现的问题如下: MSVCRTD.lib(mfc.obj) : error LNK2019: 无法解析的外部符号_WinMain@16,该符号在函数 _ ...
- error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCR...
http://blog.csdn.net/playstudy/article/details/6661868 一,问题描述MSVCRTD.lib(crtexew.obj) : error LNK201 ...
随机推荐
- swift ! 和 ? 的学习
刚开始学 这两个符号 不确定到底是否是可以互相替代 用的都混淆了 今天好好做个总结 如果声明一个变量 如下 var name:String? //只声明 没做初始化赋值 说明 当前name 是 n ...
- Data Structure Binary Tree: Convert a given Binary Tree to Doubly Linked List
http://www.geeksforgeeks.org/in-place-convert-a-given-binary-tree-to-doubly-linked-list/ #include &l ...
- 316python 基础之计算机基础、Python简介、变量、注释、基础数据类型初识、if、while、语句
一.计算机基础. cpu:相当于人的大脑,运算与控制中心. 速度 飞机 内存:4G,8G,16G....暂时存储,供给cpu数据. 速度 高铁.成本高,断电即消失. 硬盘:相当于你电脑的数据库,存储着 ...
- c#学习内容
学习winform+DevExpress 界面制作 wpf UIAutomation 控制别的程序 ok c#通过句柄控制别的程序 ok c# 截图 ok c# 多线程 ok c# 数据库myq ...
- codeforces 707D:Persistent Bookcase
Description Recently in school Alina has learned what are the persistent data structures: they are d ...
- Unity3D之Mesh(七)绘制长方体
前言: 从现在开始,终于感觉进入一点点正题了!动态创建三维立体模型mesh!依然从简单入手:长方体. 一.基本思路 由于是创建长方体mesh,由之前的研究得知,两个数据必须要有,即:顶点的数据:ver ...
- Django 文件下载功能
def file_download(request): con= MySQLdb.connect(host='192.168.xxx.xxx',user='root',passwd='xxxx',db ...
- Apache配置负载均衡-实例
公司两台服务器都安装了tomcat,配置apache作为负载均衡,当一台服务器出现故障时还能保证业务正常运行. Server1:192.168.1.100 Server2:192.168.1.200 ...
- Ubuntu 16.10 中文环境 Shell输出英文提示
/********************************************************************************** * Ubuntu 16.10 中 ...
- 2017.10.5北京清北综合强化班DAY5
拼不出的数lost.in/.out/.cpp[问题描述]3 个元素的集合{5, 1,2} 的所有子集的和分别是0,1, 2, 3, 5, 6, 7, 8.发现最小的不能由该集合子集拼出的数字是4.现在 ...