【发布时间】:2017-08-24 07:52:24
【问题描述】:
我正在尝试从该站点 (https://github.com/IntelVCL/FastGlobalRegistration) 运行“创建输入”部分
// Assume a point cloud with normal is given as
// pcl::PointCloud<pcl::PointNormal>::Ptr object
pcl::FPFHEstimationOMP<pcl::PointNormal, pcl::PointNormal, pcl::FPFHSignature33> fest;
pcl::PointCloud<pcl::FPFHSignature33>::Ptr object_features(new pcl::PointCloud<pcl::FPFHSignature33>());
fest.setRadiusSearch(feature_radius_);
fest.setInputCloud(object);
fest.setInputNormals(object);
fest.compute(*object_features);
FILE* fid = fopen("features.bin", "wb");
int nV = object->size(), nDim = 33;
fwrite(&nV, sizeof(int), 1, fid);
fwrite(&nDim, sizeof(int), 1, fid);
for (int v = 0; v < nV; v++) {
const pcl::PointNormal &pt = object->points[v];
float xyz[3] = {pt.x, pt.y, pt.z};
fwrite(xyz, sizeof(float), 3, fid);
const pcl::FPFHSignature33 &feature = object_features->points[v];
fwrite(feature.histogram, sizeof(float), 33, fid);
}
fclose(fid);
包含pcl/features/fpfh.h、pcl/features/fpfh_omp.h并链接到pcl_features_debug.lib等相关lib 文件,编译器仍然有编译代码的问题。它给了我这个链接错误:
错误 LNK2001 无法解析外部符号“private: virtual void __thiscall pcl::FPFHEstimationOMP::computeFeature(class pcl::PointCloud &)” (?computeFeature@?$FPFHEstimationOMP@UPointNormal@pcl@@U12@UFPFHSignature33@2@@ pcl@@EAEXAAV?$PointCloud@UFPFHSignature33@pcl@@@2@@Z) DepthToPointCloud D:\Luan_Van\PCL\DepthToPoint\build\main.obj 1
我已经成功地使用 pcl_io 和 pcl_visualization 编译了一些其他代码,但是这个不起作用。任何人都可以指出我的代码有什么问题吗?
顺便说一句,我使用的是 Visual Studio 2015,PCL 1.8.0
【问题讨论】:
标签: visual-studio-2015 linker point-cloud-library point-clouds