分类: WINDOWS
2011-09-01 11:45:48
Steps to build OpenCV 2.3 with Qt Creator 2.2.1 and MinGW:
1. Install Qt SDK with the C++ compiler option (MinGW). You can download it.
安装QT-SDK
2. Add “C:
设置MINGW到系统环境“PATH”里面
3. and install CMake (2.8).
下载CMAKE
4. and install OpenCV2.3.
下载OPENCV,并解压安装。
5. Run CMake GUI.
运行CMAKE
6. Set the source code: “C:\
设置源代码路径为刚解压的OPENCV文件夹
7. Set where to build binaries to: “C:\
设置编译文件夹路径
8. Press Configure
点击 配置
9. Let CMake create the new folder.
建议编译文件路径 和源代码路径不一样
10. Specify the generator: MinGW Makefiles.
选择生成器 为 MINGW
11. Select “Specify Native Compilers” and click Next.
选择“Specify Native Compilers” 然后下一步12. For C set: “C:\
13. For C++ set: “C:\
14. Click Finish
点击 完成
15. In the configuration screen type in “DEBUG” (or “RELEASE” if you want to build a release version) for CMAKE_BUILD_TYPE. Check BUILD_EXAMPLES if you want. Check WITH_QT.
勾选合适的选项 CMAKE_BUILD_TYPE -> RELEASE BUILD_EXAMPLES WITH_QT
16. Click configure again.
点击 配置
17. The configure screen will make you specify the qmake path. It is in the Qt directory: “C:\
设置QMAKE路径
18. Click configure again. Click generate. Close CMake.
点击 配置-》生成 成功后关闭CMAKE
19. Go to the command prompt and go to the folder where you built your binaries (command: cd C:\
在QT的命令行里 进入编译文件夹,然后 输入mingw32-make 然后回车 需要一段时间
20. Then type “mingw32-make install” and hit enter again.
在命令行里面 输入mingw32-make install 然后回车