[program-l] Boost/C++ query

  • From: "Tim Burgess" <tim@xxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Fri, 1 Feb 2013 12:11:48 -0000

Hi,

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-fwryryuvfvwihng
lkuymbbjtxpac/Build/Products/Debug/SurfaceReader.app/Contents/MacOS/SurfaceR
eader 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/Develop
er/SDKs/MacOSX10.8.sdk
-L/Users/tim/Library/Developer/Xcode/DerivedData/SurfaceReader-fwryryuvfvwih
nglkuymbbjtxpac/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-fwryryuvfvwih
nglkuymbbjtxpac/Build/Products/Debug -filelist
/Users/tim/Library/Developer/Xcode/DerivedData/SurfaceReader-fwryryuvfvwihng
lkuymbbjtxpac/Build/Intermediates/SurfaceReader.build/Debug/SurfaceReader.bu
ild/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_coc
oau_xrc-2.9.a
/Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_coc
oau_webview-2.9.a
/Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_coc
oau_qa-2.9.a
/Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_baseu_n
et-2.9.a
/Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_coc
oau_html-2.9.a
/Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_coc
oau_adv-2.9.a
/Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_osx_coc
oau_core-2.9.a
/Users/tim/developer/libraries/wxwidgets-2.9.4/build-debug/lib/libwx_baseu_x
ml-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-fwryryuvfvwihng
lkuymbbjtxpac/Build/Products/Debug/SurfaceReader.app/Contents/MacOS/SurfaceR
eader

Undefined symbols for architecture x86_64:
 
"boost::archive::basic_xml_iarchive<boost::archive::xml_wiarchive>::load_sta
rt(char const*)", referenced from:
      void
boost::archive::basic_xml_iarchive<boost::archive::xml_wiarchive>::load_over
ride<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

Best wishes. 
Tim Burgess 
Raised Bar Ltd. 
Tel:  +44 (0)1827 719822 
Web:  http://www.raisedbar.net 

We can supply Roland and Avid products with specialist pre and post-sales
support for visually-impaired users - just drop us a line for a quote.

Don't forget to sign our on-line petition to lobby for improved access to
music education and music technology at:  
http://www.raisedbar.net/petition.htm


Other related posts: