Linking libraries OpenCV 2.4.2 on xcode 4.5.1

后端 未结 3 1892
伪装坚强ぢ
伪装坚强ぢ 2021-02-02 00:35

I have installed opencv with macports following the directions here: Compile OpenCV (2.3.1+) for OS X Lion / Mountain Lion with Xcode

I have also search and tried every

相关标签:
3条回答
  • 2021-02-02 01:12

    I had the same problem. A build setting default seems to be different in Xcode 4.5.

    Under "Build Settings"--> Apple LLVM compiler 4.1 - Language >

    C++ Standard Library:= Change from libc++ (LLVM ...) to libstdc++ (GNU C++ ...).

    0 讨论(0)
  • 2021-02-02 01:24

    It's very likely that OpenCV has not been compiled with C++11 settings, while the program is. Set the build of your tool without C++11 switches (i.e. -std=c++11 -stdlib=libc++).

    0 讨论(0)
  • 2021-02-02 01:24

    Try to manually add the directory where port puts all the dylibs (/opt/local/lib if I'm not getting wrong) in Build Settings->Library search path. This should fix the linking problem.

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