OpenCv + mac os x + qt creator = strange linking bug?

后端 未结 1 1006
清歌不尽
清歌不尽 2020-12-17 07:26

I\'m trying to build simple OpenCV app using qt creator on Mac Os X 10.9. So i\'ve installed OpenCv and Qt4 using brew:

brew install opencv
brew install qt4
         


        
相关标签:
1条回答
  • 2020-12-17 07:42

    Ok - finally after 4 days of searching i've solved this problem. Generally solution is simple - just add:

    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
    

    to you .pro file. If don't want to add it to every .pro file you can set it "globally" - just set it in this file:

    Qt5.2.0/5.2.0-rc1/clang_64/mkspecs/macx-clang/qmake.conf 
    

    More information about this bug/problem:
    Qt5.1/Qt5.2 + Mac OS 10.9 (Mavericks) + XCode 5.0.2, Undefined symbols for architecture x86_64
    http://qt-project.org/forums/viewthread/35646/ <-- mostly here

    //edit:
    This solution only works with CLang, no luck with gcc.

    0 讨论(0)
提交回复
热议问题