I'm trying to compile a Qt appplication on my mavericks machine but get the compilation errors below.
I have set the deployment target to 10.9 by setting the QMake variable
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
This has not solved the issue. I suspect that Qt is compiling with the wrong OSX framework:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
when it should be using
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
Has anybody ran into such an issue and found a solution?
Compilation Output:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.9 -o qt-rodbot-ip.app/Contents/MacOS/qt-rodbot-ip main.o mainwindow.o videoviewer.o MatToQImage.o ipunitcontainer.o smoothingdialog.o unitlist.o units.o thresholddialog.o adaptivethresholddialog.o cannydialog.o contoursdialog.o processing.o capture.o chainwindow.o chainviewer.o morphologydialog.o sobeldialog.o moc_mainwindow.o moc_videoviewer.o moc_ipunitcontainer.o moc_smoothingdialog.o moc_unitlist.o moc_thresholddialog.o moc_adaptivethresholddialog.o moc_cannydialog.o moc_contoursdialog.o moc_processing.o moc_capture.o moc_chainwindow.o moc_chainviewer.o moc_morphologydialog.o moc_sobeldialog.o -F/Applications/Qt/5.2.1/clang_64/lib -L/usr/local/lib/ -lIPChain /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_calib3d.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_contrib.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_core.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_features2d.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_flann.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_gpu.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_highgui.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_imgproc.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_legacy.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_ml.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_nonfree.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_objdetect.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_ocl.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_photo.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_stitching.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_superres.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_ts.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_video.dylib /usr/local/Cellar/opencv/2.4.6.1/lib/libopencv_videostab.dylib -framework QtWidgets -framework QtGui -framework QtCore -framework OpenGL -framework AGL
Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from:
___cxx_global_var_init2 in main.o
___cxx_global_var_init2 in mainwindow.o
boost::thread_exception::thread_exception(int, char const*) in mainwindow.o
___cxx_global_var_init2 in videoviewer.o
___cxx_global_var_init6 in ipunitcontainer.o
___cxx_global_var_init6 in smoothingdialog.o
___cxx_global_var_init6 in unitlist.o
...
"boost::system::generic_category()", referenced from:
___cxx_global_var_init in main.o
___cxx_global_var_init1 in main.o
___cxx_global_var_init in mainwindow.o
___cxx_global_var_init1 in mainwindow.o
___cxx_global_var_init in videoviewer.o
___cxx_global_var_init1 in videoviewer.o
___cxx_global_var_init in ipunitcontainer.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [qt-rodbot-ip.app/Contents/MacOS/qt-rodbot-ip] Error 1
11:05:13: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project qt-rodbot-ip (kit: Desktop Qt 5.2.1 clang 64bit)
When executing step 'Make'
11:05:13: Elapsed time: 00:02.