在Mac上配置OpenCV+QT

发布时间:2020-07-15 17:10:32 作者:麻雀音符
阅读:1168
开发者专用服务器限时活动,0元免费领! 查看>>

1.安装Xcode

    from App Store

2.安装MacPorts(https://www.macports.org/install.php)

    注意系统版本,因为之前装错了版本,重装还导致了下面的问题

    问题:Waiting for other installations to finish(参考:http://superuser.com/questions/169908/installer-hangs-on-waiting-for-other-installations-to-finish-despite-no-other)
    解决:Chances are that a previous installation hung and the lock was never cleaned up.
       1)sudo rm /private/var/db/mds/system/mds.install.lock
       2)  reboot
    记得更新下,有点慢。(https://trac.macports.org/ticket/43228):

    Terminal: sudo port selfupdate


3.安装CMake

  (http://www.cmake.org/download/)

Terminal:ruby-e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

然后用brew安装了CMake(https://github.com/travis-ci/travis-ci/issues/2175)

Terminal: 

brew install cmake

4.安装OpenCV(http://opencv.org/downloads.html)

5.设置开发者活动目录

6.在Qt中使用

QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 到pro里
或者


http://stackoverflow.com/questions/14940126/opencv-2-4-3-cant-find-imread-and-surffeaturedetectordetect


原文参考:http://drthitirat.wordpress.com/2014/09/21/install-opencv-2-4-9-and-qt-5-3-2-on-mac-osx-10-9-5-and-xcode-6-0-1/

              

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:
  1. 在MAC上搭建Redis环境
  2. 在Mac上安装PHP的方法

开发者交流群:

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

system private previous

上一篇:Istio调用链埋点原理剖析—是否真的“零修改”分享实录(下)

下一篇:用cmd运行Spyder的方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》
开发者交流群×