參考來源:
OpenCV 2.4.2 可以在Visual studio 2010
1.下載並安裝virtual stoid 2010 與 openCV2.4.2
2.設定環境變數
D:\Hsin\openCV\opencv\build\x86\vc10\bin
D:\Hsin\openCV\opencv\build\common\tbb\ia32\vc10
3.開啟VC2012 C++ 開啟新專案,對專案點右鍵設定屬性
點選VC++目錄
編輯Include目錄 D:\Hsin\openCV\opencv\build\include;D:\Hsin\openCV\opencv\build\include\opencv;
D:\Hsin\openCV\opencv\build\include\opencv2
編輯程式庫目錄 D:\Hsin\openCV\opencv\build\x86\vc10\lib
編輯連結器→輸入→其他相依性(Debug)
opencv_core242d.lib
opencv_imgproc242d.lib
opencv_highgui242d.lib
opencv_ml242d.lib
opencv_video242d.lib
opencv_features2d242d.lib
opencv_calib3d242d.lib
opencv_objdetect242d.lib
opencv_contrib242d.lib
opencv_legacy242d.lib
opencv_flann242d.lib
編輯連結器→輸入→其他相依性(Release)
opencv_core242.lib
opencv_imgproc242.lib
opencv_highgui242.lib
opencv_ml242.lib
opencv_video242.lib
opencv_features2d242.lib
opencv_calib3d242.lib
opencv_objdetect242.lib
opencv_contrib242.lib
opencv_legacy242.lib
opencv_flann242.lib
opencv_video242d.lib
好像這樣就好了...在c++程式裡面cv::要是有跑去函式來就表示成功了
原文在inclue目錄裡面 沒有加這行 D:\Hsin\openCV\opencv\build\include\opencv;
會找不到檔案來源產生不出exe檔。
留言列表