Qt Creator和MinGW编译OpenCV

本文介绍了如何使用Qt Creator和MinGW编译OpenCV的详细步骤,包括CMake配置、编译器选择、设置qmake路径等。在编译过程中需要注意Qt、Qt Creator、MinGW、OpenCV和CMake之间的关系,以及版本兼容性问题。避免使用中文目录,以防止编译错误。最后,作者建议选择合适的OpenCV版本,避免出现难以解决的编译错误。
摘要由CSDN通过智能技术生成
下面给出的具体的用Qt Creator和MinGW编译OpenCV的步骤:


Steps to build OpenCV with Qt Creator and MinGW


1. Run CMake GUI.
2. Set the source code: “<OpenCV_directory>”
3. Set where to build binaries to: “<build_directory>”. Example: E:\OpenCV-2.3.1\MinGW
4. Press Configure
5. Let CMake create the new folder.
6. Specify the generator: MinGW Makefiles.
7. Select “Specify Native Compilers” and click Next.
8. For C set: “<Qt_directory>/mingw/bin/gcc.exe”
9. For C++ set: “<Qt_directory>/mingw/bin/g++.exe”
10. Click Finish
11. 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 .Uncheck WITH_QT.
12. Click configure again.
13. The configure screen will make you specify the qmake path. It is in the Qt directory
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值