How to setup linkage for OpenCV and Qt to use createButton? - c++

I'm looking at opencv highgui samples (like connectedcomponents.cpp) and trying to get used to adding GUI elements. Currently I'm trying to add a button:
void on_button(int, void*){
cout << "click" << end;
}
//in main()
createButton("test",on_button);
but I get a link error:
g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_CORE_LIB -I../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/macx-g++ -I. -I../../../QtSDK/Desktop/Qt/474/gcc/lib/QtCore.framework/Versions/4/Headers -I../../../QtSDK/Desktop/Qt/474/gcc/include/QtCore -I../../../QtSDK/Desktop/Qt/474/gcc/include -I/opt/local/include -I../../../QtSDK/Desktop/Qt/474/gcc/include -I. -F/Users/george/QtSDK/Desktop/Qt/474/gcc/lib -o main.o main.cpp
g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o CVConnectedComponent main.o -F/Users/george/QtSDK/Desktop/Qt/474/gcc/lib -L/Users/george/QtSDK/Desktop/Qt/474/gcc/lib /opt/local/lib/libopencv_core.dylib /opt/local/lib/libopencv_contrib.dylib /opt/local/lib/libopencv_highgui.dylib /opt/local/lib/libopencv_objdetect.dylib /opt/local/lib/libopencv_imgproc.dylib /opt/local/lib/libopencv_features2d.dylib /opt/local/lib/libopencv_video.dylib -framework QtCore -F/Users/george/Documents/Qt/CVConnectedComponent/../../../QtSDK/Desktop/Qt/474/gcc/lib/
Undefined symbols:
"cv::createButton(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(int, void*), void*, int, bool)", referenced from:
_main in main.o
make: Leaving directory `/Users/george/Documents/Qt/CVConnectedComponent'
ld: symbol(s) not found
As far as I can understand I'm not linking against the QtCore library properly.
I've this:
mac: LIBS += -framework QtCore
and this:
mac: LIBS += -F$$PWD/../../../QtSDK/Desktop/Qt/474/gcc/lib/ -framework QtCore
INCLUDEPATH += $$PWD/../../../QtSDK/Desktop/Qt/474/gcc/include
DEPENDPATH += $$PWD/../../../QtSDK/Desktop/Qt/474/gcc/include
In the .pro file of the Qt project, but with no luck.
I'm using OpenCV 2.4.1 with Qt 4.7.4 on osx 10.6.8.
What's the correct way to link to QtCore in Qt Creator to use createButton in OpenCV ?

I've reinstalled OpenCV, this time with Qt support and the code worked.
Still it's worth remembering that buttons will go into the Control Panel by default, as I found out by reading some documentation:

Related

Qt and Mongocxx linker error

I'm working on my project which uses mongoDB. I've installed mongocxx according to the official guide and it works when I'm compiling the code from command line. Now I'd like to use it in my Qt project, I've added all necessary libraries in .pro file but I can't compile my code because of linker error. The code is the simplest:
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
void connectToMongo() {
mongocxx::instance abc{};
}
.pro:
CONFIG += c++11
QMAKE_CXXFLAGS += -I/usr/local/include/mongocxx/v_noabi -I/usr/local/include/libmongoc-1.0 \
-I/usr/local/include/bsoncxx/v_noabi -I/usr/local/include/libbson-1.0 \
-L/usr/local/lib -lmongocxx -lbsoncxx
SOURCES += main.cpp
...
But, unfortunately, there is a linker's error:
Undefined symbols for architecture x86_64:
"mongocxx::v_noabi::instance::instance()", referenced from:
connectToMongo() in main.o
"mongocxx::v_noabi::instance::~instance()", referenced from:
connectToMongo() in main.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: *** [hw.app/Contents/MacOS/hw] Error 1
18:38:01: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project hw (kit: Desktop Qt 5.8.0 clang 64bit)
When executing step "Make"
the make's string:
Starting: "/usr/bin/make"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -I/usr/local/include/mongocxx/v_noabi -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/bsoncxx/v_noabi -I/usr/local/include/libbson-1.0 -L/usr/local/lib -lmongocxx -lbsoncxx -g -std=gnu++1z -Wall -W -fPIC -DQT_QML_DEBUG -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I../hw -I. -I../Qt/5.8/clang_64/lib/QtWebEngineWidgets.framework/Headers -I../Qt/5.8/clang_64/lib/QtWebEngineCore.framework/Headers -I../Qt/5.8/clang_64/lib/QtQuickControls2.framework/Headers -I../Qt/5.8/clang_64/lib/QtQuick.framework/Headers -I../Qt/5.8/clang_64/lib/QtPrintSupport.framework/Headers -I../Qt/5.8/clang_64/lib/QtWidgets.framework/Headers -I../Qt/5.8/clang_64/lib/QtGui.framework/Headers -I../Qt/5.8/clang_64/lib/QtWebChannel.framework/Headers -I../Qt/5.8/clang_64/lib/QtQml.framework/Headers -I../Qt/5.8/clang_64/lib/QtNetwork.framework/Headers -I../Qt/5.8/clang_64/lib/QtPositioning.framework/Headers -I../Qt/5.8/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -I../Qt/5.8/clang_64/mkspecs/macx-clang -F/Users/alexey/Qt/5.8/clang_64/lib -o main.o ../hw/main.cpp
clang: warning: -lmongocxx: 'linker' input unused
clang: warning: -lbsoncxx: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/lib'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wl,-rpath,/Users/alexey/Qt/5.8/clang_64/lib -o hw.app/Contents/MacOS/hw main.o qrc_qml.o moc_filldatacollections.o -F/Users/alexey/Qt/5.8/clang_64/lib -framework QtWebEngineWidgets -framework QtWebEngineCore -framework QtQuick -framework QtQml -framework QtNetwork -framework QtCore -framework DiskArbitration -framework IOKit -framework QtGui -framework QtWebChannel -framework QtPositioning -framework QtPrintSupport -framework QtWidgets -framework QtQuickControls2 -framework OpenGL -framework AGL
I've already found a decision for such problem in different topics, e.g. http://widequestion.com/question/msgasserted-linker-errors-on-mongo-c-drivers-on-macosx-10-10-3-yosemite/
but it'n't working in my case. My OS X is 10.11.
Help me, please, to resolve this problem.
clang: warning: -lmongocxx: 'linker' input unused
clang: warning: -lbsoncxx: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/lib'
You seem to have set your linker flags as cxxflags so they were applied building main.o (when they were unused) and not applied during linking to build the executable.
I haven't worked with Qt, but a quick search suggests maybe those should have been set on LIBS. See docs for declaring other libraries.

stl Linking Error on xcode

When to generate an executable with xcode, I have 3 Linking errors. I used Irrlicht 1.9 that I compile myself this morning.
I would like to say that the file CIrrDeviceOSX.mm is an objective-c file that can be found here :
https://github.com/zaki/irrlicht/blob/master/source/Irrlicht/CIrrDeviceOSX.h
https://github.com/zaki/irrlicht/blob/master/source/Irrlicht/CIrrDeviceOSX.mm
I think that the error is inside "std::map KeyCodes;" in CIrrDeviceOSX.h and used in CIrrDeviceOSX.mm
I dont know if the problem is that the file is in objective-c and the signature of the methods is different or that there are difference in version of the C++ (c++11 or ???).
Ld bin/Debug/minetest normal x86_64
cd /Users/bluholm/Desktop/minetest-release/minetest
export MACOSX_DEPLOYMENT_TARGET=10.12
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -L/Users/bluholm/Desktop/minetest-release/minetest/bin/Debug -F/Users/bluholm/Desktop/minetest-release/minetest/bin/Debug -filelist /Users/bluholm/Desktop/minetest-release/minetest-osx/src/minetest.build/Debug/minetest.build/Objects-normal/x86_64/minetest.LinkFileList -mmacosx-version-min=10.12 -Xlinker -object_path_lto -Xlinker /Users/bluholm/Desktop/minetest-release/minetest-osx/src/minetest.build/Debug/minetest.build/Objects-normal/x86_64/minetest_lto.o -Xlinker -no_deduplicate -lc++ -pagezero_size 10000 -image_base 100000000 -Wl,-search_paths_first -Wl,-headerpad_max_install_names /usr/lib/libz.dylib /usr/local/Cellar/irrlicht/1.9/lib/libIrrlicht.a -framework OpenGL -framework OpenAL /usr/local/lib/libvorbisfile.dylib /usr/local/lib/libvorbis.dylib /usr/local/lib/libogg.dylib /usr/lib/libsqlite3.dylib /usr/local/lib/libluajit-5.1.dylib /Users/bluholm/Desktop/minetest-release/minetest-osx/src/gmp/Debug/libgmp.a /Users/bluholm/Desktop/minetest-release/minetest-osx/src/jsoncpp/json/Debug/libjsoncpp.a -framework CoreFoundation -lpthread /usr/lib/libiconv.dylib -framework Carbon -framework Cocoa -framework IOKit /usr/lib/libiconv.dylib /usr/lib/libcurl.dylib /usr/local/lib/libfreetype.dylib /Users/bluholm/Desktop/minetest-release/minetest-osx/src/cguittfont/Debug/libcguittfont.a /usr/lib/libcurses.dylib /usr/lib/libform.dylib /usr/local/lib/libhiredis.dylib -framework Carbon -framework Cocoa -framework IOKit /usr/lib/libcurl.dylib /usr/lib/libcurses.dylib /usr/lib/libform.dylib /usr/local/lib/libhiredis.dylib /usr/lib/libz.dylib /usr/local/Cellar/irrlicht/1.9/lib/libIrrlicht.a /usr/local/lib/libfreetype.dylib -Xlinker -dependency_info -Xlinker /Users/bluholm/Desktop/minetest-release/minetest-osx/src/minetest.build/Debug/minetest.build/Objects-normal/x86_64/minetest_dependency_info.dat -o /Users/bluholm/Desktop/minetest-release/minetest/bin/Debug/minetest
Undefined symbols for architecture x86_64:
"std::_Rb_tree_decrement(std::_Rb_tree_node_base*)", referenced from:
std::_Rb_tree_iterator >::operator--() in libIrrlicht.a(CIrrDeviceOSX.o)
"std::_Rb_tree_increment(std::_Rb_tree_node_base*)", referenced from:
std::_Rb_tree_iterator >::operator++() in libIrrlicht.a(CIrrDeviceOSX.o)
"std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)", referenced from:
std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair const&) in libIrrlicht.a(CIrrDeviceOSX.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Try to created a new project in XCode with the sources and changed the C++ Standard Library from the default libc++ to libstdc++

clang: error: linker command failed with exit code 1 (use -v to see invocation) - Qt Creator 3.3

Alright, I know that there are other posts on this error, but I can't seem to find one that fixes my problem. The issue is that when I try to build my C++ project in Qt Creator I get two errors: 1) symbol(s) not found for architecture x86_64 and 2) linker command failed with exit code 1 (use -v to see invocation). The code builds and runs fine until I try to implement the FFT using the FFTW-3.3.4 library. The complete compiler output is:
14:55:10: Running steps for project RFdata...
14:55:10: Configuration unchanged, skipping qmake step.
14:55:10: Starting: "/usr/bin/make"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr /bin/clang++ -c -pipe -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDK s/MacOSX10.9.sdk -mmacosx-version-min=10.7 -Wall -W -fPIE -DQT_CORE_LIB - I../Qt/5.4/clang_64/mkspecs/macx-clang -I../RFdata -I../RFdata/fftw- 3.3.4/libbench2 -I../Qt/5.4/clang_64/lib/QtCore.framework/Versions/5/Headers -I. - I. -F/Users/Mike/Desktop/Qt/5.4/clang_64/lib -o main.o ../RFdata/main.cpp
../RFdata/main.cpp:93:22: warning: comparison of integers of different signs: 'long' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
for (long i = 0; i < str.length(); ++i) //M:for loop that iterates through the length of the string and //replaces each occurance of a ch1 with ch2
~ ^ ~~~~~~~~~~~~
1 warning generated.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr /bin/clang++ -c -pipe -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDK s/MacOSX10.9.sdk -mmacosx-version-min=10.7 -Wall -W -fPIE -DQT_CORE_LIB - I../Qt/5.4/clang_64/mkspecs/macx-clang -I../RFdata -I../RFdata/fftw- 3.3.4/libbench2 -I../Qt/5.4/clang_64/lib/QtCore.framework/Versions/5/Headers -I. - I. -F/Users/Mike/Desktop/Qt/5.4/clang_64/lib -o display_vector.o ../RFdata/display_vector.cpp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr /bin/clang++ -c -pipe -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDK s/MacOSX10.9.sdk -mmacosx-version-min=10.7 -Wall -W -fPIE -DQT_CORE_LIB - I../Qt/5.4/clang_64/mkspecs/macx-clang -I../RFdata -I../RFdata/fftw- 3.3.4/libbench2 -I../Qt/5.4/clang_64/lib/QtCore.framework/Versions/5/Headers -I. - I. -F/Users/Mike/Desktop/Qt/5.4/clang_64/lib -o convert_string.o ../RFdata/convert_string.cpp
/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/De veloper/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.7 -Wl,- rpath,/Users/Mike/Desktop/Qt/5.4/clang_64/lib -o RFdata main.o display_vector.o convert_string.o -F/Users/Mike/Desktop/Qt/5.4/clang_64/lib - L/Users/Mike/Desktop/RFdata/fftw-3.3.4/libbench2/ -lbench2 -framework QtCore - framework DiskArbitration -framework IOKit
Undefined symbols for architecture x86_64:
"_fftw_cleanup", referenced from:
hilbert() in main.o
"_fftw_destroy_plan", referenced from:
hilbert() in main.o
"_fftw_execute", referenced from:
hilbert() in main.o
"_fftw_plan_dft_1d", referenced from:
hilbert() in main.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: *** [RFdata] Error 1
14:55:11: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project RFdata (kit: Desktop Qt 5.4.0 clang 64bit)
When executing step "Make"
14:55:11: Elapsed time: 00:01.
I have absolutely no experience with linking libraries so any help would be absolutely amazing! I should probably show what my .pro file says since from what I can understand, adding the correct lines in the .pro file can be the difference between successfully linking to a library and not being as successful!
.pro:
QT += core
QT -= gui
TARGET = RFdata
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp \
display_vector.cpp \
convert_string.cpp
HEADERS += \
display_vector.h \
convert_string.h
macx: LIBS += -L$$PWD/fftw-3.3.4/libbench2/ -lbench2
INCLUDEPATH += $$PWD/fftw-3.3.4/libbench2
DEPENDPATH += $$PWD/fftw-3.3.4/libbench2
macx: PRE_TARGETDEPS += $$PWD/fftw-3.3.4/libbench2/libbench2.a
So, I guess the overarching question, though I realize it is a very general and possibly simple one, is how do I go about successfully linking the fftw-3.3.4 library to my c++ project in Qt creator 3.3 on my mac (OSX 10.9.5)????? This has been driving me insane!
It looks like you are trying to link a 32bit library into a 64bit executable. Either look for a 64bit library or compile it as a 32bit program.

Linking Errors tinyxml on OS X 10.9.2

I would like to use tinyxml. I have used it in the past, and it works great. The only problem is I was developing on my Linux box which is a laptop. I have a mac mini and I have that set up as my desktop, so I would like to use it for a big chunk of development.
I have a simple tinyxml example that one of my instructors gave me. With this example came a Makefile like so:
ifeq ("$(shell whoami)", "malloy")
CXX = clang++
else
CXX = g++
endif
# Warnings frequently signal eventual errors:
CXXFLAGS=`sdl-config --cflags` -g -W -Wall -Weffc++ -Wextra -pedantic -O0
ifeq ("$(shell uname)", "Darwin")
LDFLAGS = -framework Foundation -framework GLUT -framework OpenGL -lm
else
ifeq ("$(shell uname)", "Linux")
LDFLAGS = `sdl-config --libs` -lm -lSDL_ttf -lSDL_image -ltinyxml
endif
endif
OBJS = \
main.o
EXEC = run
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $#
$(EXEC): $(OBJS)
$(CXX) $(CXXFLAGS) -o $# $(OBJS) $(LDFLAGS)
main.o: main.cpp
clean:
rm -rf $(OBJS)
rm -rf $(EXEC)
And when I try to make this simple project I get all of these Undefined symbol errors.
This is what terminal outputs after I type make:
g++ `sdl-config --cflags` -g -W -Wall -Weffc++ -Wextra -pedantic -O0 -o run main.o - framework Foundation -framework GLUT -framework OpenGL -lm
Undefined symbols for architecture x86_64:
"TiXmlString::nullrep_", referenced from:
TiXmlString::quit() in main.o
"TiXmlDocument::LoadFile(TiXmlEncoding)", referenced from:
_main in main.o
"TiXmlDocument::TiXmlDocument(char const*)", referenced from:
_main in main.o
"TiXmlNode::Clear()", referenced from:
_main in main.o
"TiXmlNode::~TiXmlNode()", referenced from:
TiXmlDocument::~TiXmlDocument() in main.o
"TiXmlElement::Attribute(char const*) const", referenced from:
_main in main.o
"TiXmlNode::FirstChildElement() const", referenced from:
TiXmlNode::FirstChildElement() in main.o
"TiXmlNode::NextSiblingElement() const", referenced from:
TiXmlNode::NextSiblingElement() in main.o
"vtable for TiXmlDocument", referenced from:
TiXmlDocument::~TiXmlDocument() in main.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [run] Error 1
I know it is a linker error that is about it. I used Homebrew to install tinyxml. It was actually giving me problems so after I got the tar-ball for tinyxml I extracted it and put the folder in /usr/local/include. g++ doesn't complain about finding the files. Just stuff with the v-table.
Any help is greatly appreciated! Thanks in advance!!!
You should modify the makefile and instruct the linker to use tinyxml (-ltinyxml) in the "Darwin" case. AFAIK, tinyxml is not bundled with OSX so you may need to find or build that. Instead, you can use expat (simpler-easier) or libxml2 (faster-detailed), which already come with OSX (you can also use (c++) wrappers, google them...)

linking boost serialisation static library in XCode 4.5.2 c++ project

I’m building an application on Mac OSX 10.8 (Mountain Lion) and I’m getting a linkage error relating to a Boost library (serialisation.a). I’m using other Boost binaries in the same project and they’re not throwing up any problems, so I’m pretty confident that I’ve built the libraries correctly (I elected to build the entire suite of libraries for the Darwin toolset). For the same reason, I’m reasonably confident that my linker path is set correctly. I know there aren’t many Mac developers on this list, but I’m wondering if anybody can offer any suggestions. The project is handled by XCode 4.5.2 and uses the GCC 4.2 compiler. The following is the output from the build (I’ve only included the first error – all of the rest are variations on a theme and all refer to Boost::archive or Boost::serialisation (both of which are contained within the Boost serialisation.a static library file).
Ld /Users/tim/Library/Developer/Xcode/DerivedData/SurfaceReader-fwryryuvfvwihnglkuymbbjtxpac/Build/Products/Debug/SurfaceReader.app/Contents/MacOS/SurfaceReader normal x86_64
cd /Users/tim/Developer/SurfaceReader
setenv MACOSX_DEPLOYMENT_TARGET 10.8
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-g++-4.2 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/tim/Library/Developer/Xcode/DerivedData/SurfaceReader-fwryryuvfvwihnglkuymbbjtxpac/Build/Products/Debug -L/users/tim/developer/libraries/boost_1_50_0/lib -L/users/tim/developer/libraries/cryptopp561 -F/Users/tim/Library/Developer/Xcode/DerivedData/SurfaceReader-fwryryuvfvwihnglkuymbbjtxpac/Build/Products/Debug -filelist /Users/tim/Library/Developer/Xcode/DerivedData/SurfaceReader-fwryryuvfvwihnglkuymbbjtxpac/Build/Intermediates/SurfaceReader.build/Debug/SurfaceReader.build/Objects-normal/x86_64/SurfaceReader.LinkFileList -mmacosx-version-min=10.8 -L/Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_cocoau_xrc-2.9.a /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_cocoau_webview-2.9.a /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_cocoau_qa-2.9.a /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_baseu_net-2.9.a /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_cocoau_html-2.9.a /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_cocoau_adv-2.9.a /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_cocoau_core-2.9.a /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_baseu_xml-2.9.a /Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_baseu-2.9.a -framework WebKit -lexpat -lwxregexu-2.9 -lwxtiff-2.9 -lwxjpeg-2.9 -lwxpng-2.9 -lz -lpthread -liconv -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -framework CoreMIDI -framework CoreAudio -framework Cocoa -lboost_filesystem -lboost_iostreams -lboost_serialization -lboost_system -lcryptopp -o /Users/tim/Library/Developer/Xcode/DerivedData/SurfaceReader-fwryryuvfvwihnglkuymbbjtxpac/Build/Products/Debug/SurfaceReader.app/Contents/MacOS/SurfaceReader
Undefined symbols for architecture x86_64:
"boost::archive::basic_xml_iarchive<boost::archive::xml_wiarchive>::load_start(char const*)", referenced from:
void boost::archive::basic_xml_iarchive<boost::archive::xml_wiarchive>::load_override<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >(boost::serialization::nvp<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > const&, int)in SurfaceFrame.o
Changing Apple LLVM Standard Compiler 4.2 - Language / C++ Standard Library setting from libc++ (LLVM) to libstdc++ (GNU) solved the same case for me.