Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual c++ 链路错误LNK2020&;2001年Visual C++;在VS2012中使用PCL库_Visual C++_Visual Studio 2012_Linker Errors_Lnk_Point Cloud Library - Fatal编程技术网

Visual c++ 链路错误LNK2020&;2001年Visual C++;在VS2012中使用PCL库

Visual c++ 链路错误LNK2020&;2001年Visual C++;在VS2012中使用PCL库,visual-c++,visual-studio-2012,linker-errors,lnk,point-cloud-library,Visual C++,Visual Studio 2012,Linker Errors,Lnk,Point Cloud Library,我正在尝试使用开放点云库来对齐点云。我使用VisualStudio 2012创建了一个新的VisualC++项目。 存储PCL的所有.lib的目录添加到项目的属性中(属性->c/c++->常规->附加包含目录) 我要使用的库列在属性->链接器->输入->其他依赖项中 到目前为止,我编写的代码非常简单: #include <iostream> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #inc

我正在尝试使用开放点云库来对齐点云。我使用VisualStudio 2012创建了一个新的VisualC++项目。 存储PCL的所有.lib的目录添加到项目的属性中(属性->c/c++->常规->附加包含目录) 我要使用的库列在属性->链接器->输入->其他依赖项中

到目前为止,我编写的代码非常简单:

#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>

int main(int argc, char** argv)
{
    //creates a PointCloud<PointXYZ> boost shared pointer and initializes it
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_src (new pcl::PointCloud<pcl::PointXYZ>); 
    //load Pointsclouds from PCD-Files       
    pcl::io::loadPCDFile<pcl::PointXYZ> ("pcd_ascii.pcd", *cloud_src); // <- at this point the error occurs
}
#包括
#包括
#包括
#包括
int main(int argc,字符**argv)
{
//创建PointCloud boost共享指针并对其进行初始化
pcl::PointCloud::Ptr cloud_src(新pcl::PointCloud);
//从PCD文件加载Pointsclouds
pcl::io::loadPCDFile(“pcd_ascii.pcd”,*cloud_src);//常量和,结构传感器和msgs::PointCloud2&,类特征::矩阵和,类特征::四元数和,int&,int&,无符号int&,int)”(?readHeader@PCDReader@pcl@@UAEHABV?$basic_string@DU?$char_traits@D@性病病毒$allocator@D@2@@std@@AAUPointCloud2@sensor_msgs@@AAV$Matrix@M$03$00$0A@$03$00@Eigen@@AAV$Quaternion@M$0A@@8@AAH4AAIH@Z) .D:\Documents\Code\PCL\u cpp\PCL\u cpp\PCL\u cpp\PCL\u registration.obj PCL\u cpp

Fehler 31错误LNK2001:Nicht aufgel÷stes externes Symbol“public:virtual int uu thiscall pcl::PCDRADER::read(类std::basic_string,类std::allocator>const&,struct sensor\u msgs::PointCloud2&,类eigent::Matrix&,类eigent::Quaternion&,int&,int&)(?read@PCDReader@pcl@@UAEHABV?$basic_string@DU?$char_traits@D@性病病毒$allocator@D@2@@std@@AAUPointCloud2@sensor_msgs@@AAV$Matrix@M$03$00$0A@$03$00@Eigen@@AAV$Quaternion@M$0A@@8@AAHH@Z) .D:\Documents\Code\PCL\u cpp\PCL\u cpp\PCL\u cpp\PCL\u registration.obj PCL\u cpp

Fehler 32错误LNK2001:Nicht aufgel÷stes externes Symbol“void u cdecl pcl::console::print(枚举pcl::console::详细程度,字符常量*,…)”(?print@console@pcl@$$FYAXW4VERBOSITY_LEVEL@12@PBDZZ)“.D:\Documents\Code\PCL\u cpp\PCL\u cpp\PCL\u cpp\PCL\u registration.obj PCL\u cpp

这些错误在德语中是“Nicht aufgelöstes”的意思是未解决的 关于正确的安装…我不是舒尔,所以我下载并重新安装了它。它是64位“Windows MSVC 2010(64位)”的完整安装程序
安装后,我得到了相同的结果。

首先检查所有编译器和库是否具有相同的32位或64位版本

您需要从外部链接这些库:

/LIBPATH:"C:\Program Files (x86)\PCL 1.6.0\lib" "pcl_common_debug.lib" "pcl_io_debug.lib"     pcl_common_release.lib" "pcl_features_release.lib" 
您可以将此行添加到您的:

project>properties>commandline

您的体系结构(x86/x64)是否使用了正确的PCL安装?请不要让我们猜测链接器错误。这些错误旨在帮助诊断问题。如果看不到它们,我们将无法执行此操作。抱歉,我忘了将它们添加到说明中。感谢您的快速响应PCL头文件文件夹应包含在(属性->VC++目录->包含目录)和库文件文件夹应包含在(属性->VC++目录->库目录)中。您已经这样做了吗?从您的描述中看不太清楚。谢谢!您上次的提示-->属性-->VC解决了链接器错误