最近在弄一个C#可调用的PCL MFC dll,中间出现了一些问题,在此做些小总结,我已经预想到这会写的很乱,抱歉了。
首先是这个问题:
网上找到的方法讲的是,pcl里的min,max函数与全局的min,max冲突了,需要在包含PCL头文件前面添加:
#undef max
#undef min
这样就可以运行了,至少MFC与PCL冲突的new(),是将以下三行注释掉。
//#ifdef _DEBUG
//#define new DEBUG_NEW
//#endif
包含目录:
G:\Program Files (x86)\OpenNI\Include;G:\Program Files (x86)\PCL 1.6.0\include\pcl-1.6;G:\Program Files (x86)\PCL 1.6.0\3rdParty\Qhull\include;G:\Program Files (x86)\PCL 1.6.0\3rdParty\VTK\include\vtk-5.8;G:\Program Files (x86)\PCL 1.6.0\3rdParty\FLANN\include;G:\Program Files (x86)\PCL 1.6.0\3rdParty\Eigen\include;G:\Program Files (x86)\PCL 1.6.0\3rdParty\Boost\include;D:\OpenCV2.1\include\opencv; //这个和PCL无关
PCL自带的openni没有装,因为之前已经有个低版本的openni,PCL需要的openni.lib及
openni.dll可以先把自带的openni装了以后,提取出来再删除。如果有两个版本的openni
会用不了kinect的sensor。
包含库目录:
D:\Program Files\OpenNI\Lib;G:\Program Files (x86)\OpenNI\Lib;G:\Program Files (x86)\PCL 1.6.0\lib;G:\Program Files (x86)\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8;G:\Program Files (x86)\PCL 1.6.0\3rdParty\Qhull\lib;G:\Program Files (x86)\PCL 1.6.0\3rdParty\FLANN\lib;G:\Program Files (x86)\PCL 1.6.0\3rdParty\Boost\lib;D:\OpenCV2.1\lib
附加依赖项:
opengl32.lib;pcl_kdtree_debug.lib;pcl_io_debug.lib;pcl_search_debug.lib;pcl_segmentation_debug.lib;pcl_apps_debug.lib;pcl_features_debug.lib;pcl_filters_debug.lib;pcl_visualization_debug.lib;pcl_common_debug.lib;flann_cpp_s-gd.lib;vtkalglib-gd.lib;vtkCharts-gd.lib;vtkCommon-gd.lib;vtkDICOMParser-gd.lib;vtkexoIIc-gd.lib;vtkexpat-gd.lib;vtkFiltering-gd.lib;vtkfreetype-gd.lib;vtkftgl-gd.lib;vtkGenericFiltering-gd.lib;vtkGeovis-gd.lib;vtkGraphics-gd.lib;vtkhdf5-gd.lib;vtkHybrid-gd.lib;vtkImaging-gd.lib;vtkInfovis-gd.lib;vtkIO-gd.lib;vtkjpeg-gd.lib;vtklibxml2-gd.lib;vtkmetaio-gd.lib;vtkNetCDF-gd.lib;vtkNetCDF_cxx-gd.lib;vtkpng-gd.lib;vtkproj4-gd.lib;vtkRendering-gd.lib;vtksqlite-gd.lib;vtksys-gd.lib;vtktiff-gd.lib;vtkverdict-gd.lib;vtkViews-gd.lib;vtkVolumeRendering-gd.lib;vtkWidgets-gd.lib;vtkzlib-gd.lib;
至于调用mfc dll的方法,之前有总结过。
请使用手机"扫一扫"x