I am working on opencv, Qt application on my mac computer, however, the compiling gives me the error like
Undefined symbols for architecture x86_64
I founder the solution from here, Qt5.1/Qt5.2 + Mac OS 10.9 (Mavericks) + XCode 5.0.2, Undefined symbols for architecture x86_64
that I changed /usr/local/Cellar/qt5/5.3.2/mkspecs/macx-clang/qmake.conf
from
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
to
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
after cleaning the project, it doesn't work, I wonder any other to change ?
///// update ////
previously i found my default kit used the g++ as the compiler and now I changed to clang as the default compiler, you can see my config here https://www.dropbox.com/s/93viwvf1a70s347/Screenshot%202015-02-13%2002.43.23.png?dl=0
but what is getting wired, the error 'Undefined symbols for architecture x86_64' still exist and also there is another error saying: error: linker command failed with exit code 1 (use -v to see invocation)
what is wrong??
/// update ////
#-------------------------------------------------
#
# Project created by QtCreator 2014-06-08T01:54:11
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webkitwidgets
TARGET = particle_filter
TEMPLATE = app
QT += network
SOURCES += main.cpp\
HEADERS += \
FORMS += \
parkingapp.ui \
#-------------------------------------------------
INCLUDEPATH += /usr/local/Cellar/opencv/2.4.9/include
LIBS += -L/usr/local/Cellar/opencv/2.4.9/lib \
-lopencv_core \
-lopencv_highgui \
-lopencv_imgproc \
-lopencv_video \
-lopencv_objdetect \
-lopencv_ml \
-lopencv_features2d
#-------------------------------------------------
later i found this http://qt-project.org/forums/viewthread/24551/P15, so I added this to the end of my .pro
LIBS += -stdlib=libc++
QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -mmacosx-version-min=10.9
QMAKE_LFLAGS += -mmacosx-version-min=10.9
but still don't work .... :(