Chinaunix首页 | 论坛 | 博客
  • 博客访问: 421077
  • 博文数量: 37
  • 博客积分: 1989
  • 博客等级: 上尉
  • 技术积分: 390
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-13 10:30
文章分类

全部博文(37)

文章存档

2013年(2)

2012年(1)

2011年(31)

2010年(1)

2009年(2)

分类: 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/bin” to the system PATH.

设置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:\”. Example: “C:\OpenCV2.2MinGW”

设置编译文件夹路径

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:\\mingw\bin\gcc.exe”

设置C 为“C:\\mingw\bin\gcc.exe”


13. For C++ set: “C:\\mingw\bin\g++.exe”

设置C++为“C:\\mingw\bin\g++.exe”

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:\\qt\bin\qmake.exe”

设置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:\) and type “mingw32-make” and hit enter (this might take some time).

在QT的命令行里 进入编译文件夹,然后 输入mingw32-make 然后回车  需要一段时间

20. Then type “mingw32-make install” and hit enter again.

在命令行里面 输入mingw32-make install 然后回车

阅读(5206) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~