本帖最后由 欧神 于 2013-10-21 22:36 编辑
环境:VS2008、win7
步骤: 1. 安装第三方库 (1)直接在官网上下载对应的库文件 (2)下载并安装CUDA toolkit 2. cmake配置 cmake gui中勾选项: 2d ;CUDA ; GPU; OPENNI; common; features; filters; geometry; gpu_containers; gpu_features; gpu_kinfu; gpu_kinfu_large_scale; gpu_octree; gpu_people; gpu_segmentation; gpu_surface; gpu_tracking; gpu_utils; io; kdtree; keypoints; octree; registration; sample_consensus; search; simulation; visualization (1)需要配置CUDA路径才能出现gpu各项,这里配置后出现的cuda项均不选 CUDA_TOOLKIT_ROOT_DIR C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0 (2)其他配置按照官网配置即可,主要是指定第三方库的安装路径的include和lib (3)配置完后点击Configure,查看需要的项是否被勾选上,否则重新配置并且知道配置界面中无红色显示 (4)点击Generate生成配置好的工程文件 3. 运行PCL.sln (1)编译ALL_BUILD工程,生成所需的库文件和bin目录下的文件 (2)在D:\Program Files\Microsoft Visual Studio 9.0\VC\include目录下新建文件stdin.h文件,主要用于解决vs2008中有些宏定义未指定的问题,并在编译有问题的文件中添加包含文件 #include <stdin.h> stdin文件内容: #ifndef _STDINT_H_ALL_ #define _STDINT_H_ALL_ typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef long long int64_t; typedef unsigned long long uint64_t; #endif
|