Using OpenCV 2.45 in Vsiual Studio 2012
First
Open Windows Explorer. Click on Computer and then System properties.
Choose Advanced system settings.
Click Environment Variables...
Add only this to Environment Variables -> System variables -> Path
C:\OpenCV\build\x64\vc11\bin
Second
After creating your own project in Visual Studio 2012...
Build menu -> Configuration Manager
Change the Active solution platform. Click on Win32, Select New.... Use the settings below and click OK.
Third
For Release:
View -> Property Manager
Double click Release | x64
- C/C++ -> General -> Additional Include Directories
C:\OpenCV\build\include\opencvC:\OpenCV\build\include
- Linker -> General -> Additional Library Directories
C:\OpenCV\build\x64\vc11\lib
- Linker -> Input -> Additional Dependencies
opencv_calib3d245.libopencv_contrib245.libopencv_core245.libopencv_features2d245.libopencv_flann245.libopencv_gpu245.libopencv_haartraining_engine.libopencv_highgui245.libopencv_imgproc245.libopencv_legacy245.libopencv_ml245.libopencv_nonfree245.libopencv_objdetect245.libopencv_photo245.libopencv_stitching245.libopencv_ts245.libopencv_video245.libopencv_videostab245.lib
For Debug:
View -> Property Manager
Double click Debug | x64
- C/C++ -> General -> Additional Include Directories
C:\OpenCV\build\include\opencvC:\OpenCV\build\include
- Linker -> General -> Additional Library Directories
C:\OpenCV\build\x64\vc11\lib
- Linker -> Input -> Additional Dependencies
opencv_calib3d245d.libopencv_contrib245d.libopencv_core245d.libopencv_features2d245d.libopencv_flann245d.libopencv_gpu245d.libopencv_haartraining_engined.libopencv_highgui245d.libopencv_imgproc245d.libopencv_legacy245d.libopencv_ml2445.libopencv_nonfree245d.libopencv_objdetect245d.libopencv_photo245d.libopencv_stitching245d.libopencv_ts245d.libopencv_video245d.libopencv_videostab245d.lib
Note the file names has extra "d" which means debug
Using OpenCV 2.43 in Vsiual Studio 2012
First
Download CMake. Open CMake and use settings below. Then click Configure.
Choose Visual Studio 11 Win64. Click Finish.
After a while, click Configure again. Wait a moment and then click Generate.
Close CMake and go to C:\MyOpenCV, open OpenCV.sln.
Choose Debug.
Right click INSTALL. And choose Build.
After a long period of time, go back and choose Release. Similarly, right click INSTALL. And chooseBuild.
Note: If you have a problem during install build you have to make clean and build it again.
Note: If you have a problem during install build you have to make clean and build it again.
Close Visual Studio 2012.
Copy C:\MyOpenCV\install folder to C:\OpenCV.
So now you have a C:\OpenCV\install folder. You can delete C:\MyOpenCV whole folder if you want.
Second
Open Windows Explorer. Click on Computer and then System properties.
Choose Advanced system settings.
Click Environment Variables...
Add only this to Environment Variables -> System variables -> Path
C:\OpenCV\install\bin
Third
After creating your own project in Visual Studio 2012...
Build menu -> Configuration Manager
Change the Active solution platform. Click on Win32, Select New.... Use the settings below and click OK.
Fourth
For Release:
View -> Property Manager
Double click Release | x64
- C/C++ -> General -> Additional Include Directories
C:\OpenCV\build\include\opencvC:\OpenCV\build\include
- Linker -> General -> Additional Library Directories
C:\OpenCV\build\x64\vc11\lib
- Linker -> Input -> Additional Dependencies
opencv_calib3d245.libopencv_contrib245.libopencv_core245.libopencv_features2d245.libopencv_flann245.libopencv_gpu245.libopencv_haartraining_engine.libopencv_highgui245.libopencv_imgproc245.libopencv_legacy245.libopencv_ml245.libopencv_nonfree245.libopencv_objdetect245.libopencv_photo245.libopencv_stitching245.libopencv_ts245.libopencv_video245.libopencv_videostab245.lib
For Debug:
View -> Property Manager
Double click Debug | x64
- C/C++ -> General -> Additional Include Directories
C:\OpenCV\build\include\opencvC:\OpenCV\build\include
- Linker -> General -> Additional Library Directories
C:\OpenCV\build\x64\vc11\lib
- Linker -> Input -> Additional Dependencies
opencv_calib3d245d.libopencv_contrib245d.libopencv_core245d.libopencv_features2d245d.libopencv_flann245d.libopencv_gpu245d.libopencv_haartraining_engined.libopencv_highgui245d.libopencv_imgproc245d.libopencv_legacy245d.libopencv_ml245d.libopencv_nonfree245d.libopencv_objdetect245d.libopencv_photo245d.libopencv_stitching245d.libopencv_ts245d.libopencv_video245d.libopencv_videostab245d.lib
Note the file names has extra "d" which means debug
http://answers.opencv.org/question/6495/visual-studio-2012-and-rtlfreeheap-error/#6603 << Thank you so much
http://answers.opencv.org/question/6495/visual-studio-2012-and-rtlfreeheap-error/#6603 << Thank you so much