Boost logo

Boost Users :

Subject: [Boost-users] weird Link error with XCode 4
From: Kumar, Akhilesh (Akhilesh.Kumar_at_[hidden])
Date: 2011-05-03 19:27:47


Hi,

I am having weird link error during the release build details give below, I was having some problem with the Debug build also but after playing with "InlineMethodHidden and SymbolhiddenbyDefault" flag I was able to build in Debug config, but this trick does not work in Release config. I addition to boost library I am also using JsonSpirit library. Though I have manually copied 10.5 SDK to support 10.5 system but using 10.6 SDK also result in similar looking link error.

Boost and Json Spirit was compiled with 3.2 version of Xcode.

This code compile and run perfectly fine in Xcode 3.2. Any pointer will be appreciated.

Link Error
**************
ld: bad codegen, pointer diff in void (anonymous namespace)::throw_error<boost::spirit::classic::multi_pass<std::istream_iterator<wchar_t, wchar_t, std::char_traits<wchar_t>, int>, boost::spirit::classic::multi_pass_policies::input_iterator, boost::spirit::classic::multi_pass_policies::ref_counted, boost::spirit::classic::multi_pass_policies::buf_id_check, boost::spirit::classic::multi_pass_policies::std_deque> >(boost::spirit::classic::multi_pass<std::istream_iterator<wchar_t, wchar_t, std::char_traits<wchar_t>, int>, boost::spirit::classic::multi_pass_policies::input_iterator, boost::spirit::classic::multi_pass_policies::ref_counted, boost::spirit::classic::multi_pass_policies::buf_id_check, boost::spirit::classic::multi_pass_policies::std_deque>, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)to global weak symbol typeinfo for std::basic_string<char, std::char_traits<char>, std::allocator<char> >for architecture i386

Command /Developer/usr/bin/g++-4.2 failed with exit code 1

GenerateDSYMFile build/Release/libSariManager.dylib.dSYM build/Release/libSariManager.dylib
    cd /Users/Shared/P4/code/client
    /Developer/usr/bin/dsymutil /Users/Shared/P4/code/client/build/Release/libSariManager.dylib -o /Users/Shared/P4/code/client/build/Release/libSariManager.dylib.dSYM

error: unable to open executable '/Users/Shared/P4/code/client/build/Release/libSariManager.dylib'

Akhilesh Kumar



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net