SDK环境配置真的让人头大,由于也是第一次接触c++和visual studio ,所以很不熟悉,更不要说调用相机的SDK及其环境的配置了。没办法只能请教我的师兄以及大恒技术人员,师兄和大恒技术人员非常给力!弄明白了,记录一下!以免自己再忘记!
SDK在新项目中使用:
(1)创建空项目Project2
(2)创建.CPP文件
(3)将示例程序中画箭头的程序拷贝到CPP中
(4)开始设置项目属性 平台为x64
环境设置
PATH=$(CX_SDK_ROOT_64)\bin;$(CX_SDK_ROOT_64)\ThirdParty\opencv-3.4.2\build_win_vc140_64_shared_vtk_static\x64\vc14\bin;$(PATH)
常规:
$(CX_SDK_ROOT_64)\cx3dLib\include
$(CX_SDK_ROOT_64)\cx3dLib\wrapper\cpp\include
$(CX_SDK_ROOT_64)\cxBaseLib\include
$(CX_SDK_ROOT_64)\cxBaseLib\wrapper\cpp\include
$(CX_SDK_ROOT_64)\ThirdParty\opencv-3.4.2\build_win_vc140_64_shared_vtk_static\include
$(CX_SDK_ROOT_64)\ThirdParty\opencv-3.4.2\build_win_vc140_64_shared_vtk_static\include\opencv
链接库:
C:\Program Files\cxSupportPackage\cxSDK\ThirdParty\opencv-3.4.2\build_win_vc140_64_shared_vtk_static\x64\vc14\bin
C:\Program Files\cxSupportPackage\cxSDK\ThirdParty\opencv-3.4.2\build_win_vc140_64_shared_vtk_static\include\opencv2
C:\Program Files\cxSupportPackage\cxSDK\ThirdParty\opencv-3.4.2\build_win_vc140_64_shared_vtk_static\include\opencv
C:\Program Files\cxSupportPackage\cxSDK\ThirdParty\opencv-3.4.2\build_win_vc140_64_shared_vtk_static\x64\vc14\lib
$(CX_SDK_ROOT_64)\cx3dLib\lib\cx3dLib_2_3.lib
$(CX_SDK_ROOT_64)\cxBaseLib\lib\CxBaseLib_2_4.lib
opencv_calib3d342d.lib
opencv_features2d342d.lib
opencv_viz342d.lib
opencv_highgui342d.lib
opencv_flann342d.lib
opencv_videoio342d.lib
opencv_imgcodecs342d.lib
opencv_imgproc342d.lib
opencv_core342d.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
(5)添加头文件:
不能复制,要一步步去找对应文件夹的对应路径去添加! 路径1文件-----》C:\Program Files\cxSupportPackage\cxSDK\cxBaseLib\wrapper\cpp\include\AT\cx\Chunk.h 路径2文件-----》C:\Users\Public\Documents\cxSupportPackage\cxCamLib\examples\cpp\cx_cam_common.h 路径3文件-----》C:\Program Files\cxSupportPackage\cxSDK\cxCamLib\wrapper\cpp\include\AT\cx\Device.h
(6)添加.cpp文件
(7)修改文件目录,否则找不到文件会报错
(8)最终结果
|