2014-09-15 00:04:41 -0600 | commented answer | How to Link OpenCV 2.4.9 & Qt in MacOS Glad it worked out for you. Have fun :) |
2014-09-11 16:32:52 -0600 | answered a question | How to Link OpenCV 2.4.9 & Qt in MacOS Hello Macs, When you run into this problem of 'undefined symbols' with MacOS and opencv, I think it is because the calling conventions are different for clang++ C99 and c++11 (it shows you are calling g++ but on Mavericks that is symlinked to clang IIRC...unless you are actually using g++ installed with brew or some such...but then this error probably wouldn't happen). What you need to do is add: QMAKE_CXXFLAGS+=-std=c++11 QMAKE_CXXFLAGS+=-stdlib=libc++ QMAKE_LFLAGS+=-std=c++11 QMAKE_LFLAGS+=-stdlib=libc++ to your .pro file. You will also need to add: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 because libc++ is only supported on 10.7+. And that should fix things... YMMV ;) Thanks, K.Wilson P.S. Please post back if this fixes things, as it may help others. |