
I followed the instructions from here: http://www.boost.org/doc/libs/1_40_0/more/getting_started/unix-variants.html... and it spent a bunch of time compiling everything. no errors. yay. so then i go to link my program, i added <boost dir>/stage/lib/ libboost_thread.a to my project, cuz that's how you static link, right? where <boost dir> is the location of the boost installation but it says: <boost dir>/bin.v2/libs/thread/build/darwin-4.2.1/release/threading- multi/libboost_thread.dylib, file is not of required architecture Undefined symbols: <long list of all the boost symbols i used> interesting that even by adding the .a file, it went and found the dylib? is that normal? anyway, wrong architecture?? how do i make it build universal? (PPC plus intel? and what's with the missing symbols? i'm not really a n00b, i just appear to be one today.

AMDG David M. Cotter wrote:
I followed the instructions from here: http://www.boost.org/doc/libs/1_40_0/more/getting_started/unix-variants.html...
and it spent a bunch of time compiling everything. no errors. yay.
so then i go to link my program, i added <boost dir>/stage/lib/libboost_thread.a to my project, cuz that's how you static link, right? where <boost dir> is the location of the boost installation
but it says:
<boost dir>/bin.v2/libs/thread/build/darwin-4.2.1/release/threading-multi/libboost_thread.dylib, file is not of required architecture
Undefined symbols: <long list of all the boost symbols i used>
interesting that even by adding the .a file, it went and found the dylib? is that normal? anyway, wrong architecture?? how do i make it build universal? (PPC plus intel?
bjam ... architecture=combined ?
and what's with the missing symbols?
You can ignore these errors. They should go away with the architecture problem.
i'm not really a n00b, i just appear to be one today.
In Christ, Steven Watanabe

bjam ... architecture=combined
okay now i get this:
darwin.compile.c++ bin.v2/libs/math/config/darwin-4.2.1/release/ architecture-combined/link-static/threading-multi/ has_long_double_support.o /Users/davec/Developer/depot/kJams/External/boost_1_40_0/libs/math/ config/has_long_double_support.cpp:9:2: error: #error "long double support is not supported by Boost.Math on this Plaform: the long double version of the TR1 library will not be built." lipo: can't figure out the architecture type of: /var/folders/h7/ h7zL6S-RECGa80fEMYXIpk+++TI/-Tmp-//cc9IHJPJ.out
is that a bad thing?

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of David M. Cotter Sent: Saturday, October 03, 2009 11:34 PM To: boost@lists.boost.org Subject: Re: [boost] threads: linking on OSX
bjam ... architecture=combined
okay now i get this:
darwin.compile.c++ bin.v2/libs/math/config/darwin-4.2.1/release/ architecture-combined/link-static/threading-multi/ has_long_double_support.o /Users/davec/Developer/depot/kJams/External/boost_1_40_0/libs/math/ config/has_long_double_support.cpp:9:2: error: #error "long double support is not supported by Boost.Math on this Plaform: the long double version of the TR1 library will not be built." lipo: can't figure out the architecture type of: /var/folders/h7/ h7zL6S-RECGa80fEMYXIpk+++TI/-Tmp-//cc9IHJPJ.out
is that a bad thing?
the config file contains #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #error "long double support is not supported by Boost.Math on this Plaform: the long double version of the TR1 library will not be built." #endif So the error message means BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS must be defined, so that you won't get long double support. I suspect this is because you are using Darwin. I:\boost-sandbox\math_toolkit\boost\math\tools\config.hpp In it John Maddock notes: // Darwin's rather strange "double double" is rather hard to // support, it should be possible given enough effort though... I believe that the upshot is all is well using double and float, but not long double. If you don't want long double, no problem. If you really need more accuracy, you could use NTL (for which support is provided - see the docs). HTH Paul PS John Maddock may well give a more authoritative reply in due course.

i've compiled my boost library. i want to use threads in my stand- alone application i want this to work even on machines that don't have boost installed, obviously. so i have a couple custom build steps in my XCode proj: I have a "Copy Files" step which copies "libboost_thread.dylib" into the "SharedSupport" folder of my application bundle then the normal "link with binaries" step, which links with the thread.dylib which is in the normal "install" location (/usr/local/lib/) then i have a "custom shell script" step (after the linking step) which does this: install_name_tool -change libboost_thread.dylib @loader_path/../ SharedSupport/libboost_thread.dylib "${BUILT_PRODUCTS_DIR}/$ {EXECUTABLE_PATH}"; what this does is cause the executable to link with the libboost_thread.dylib that is in the SharedSupport folder in the app bundle, or so i thought. because when i run, it fails to launch because it can't find the dylib, i get this in the console: 10/9/09 2:19:35 PM [0x0-0x41d41d].com.foo.foo[88777] dyld: Library not loaded: @loader_path/../SharedSupport/libboost_thread.dylib 10/9/09 2:19:35 PM [0x0-0x41d41d].com.foo.foo[88777] Referenced from: /Users/davec/Desktop/Foo.app/Contents/MacOS/Foo 10/9/09 2:19:35 PM [0x0-0x41d41d].com.foo.foo[88777] Reason: no suitable image found. Did find: 10/9/09 2:19:35 PM [0x0-0x41d41d].com.foo.foo[88777] /Users/davec/ Desktop/Foo.app/Contents/MacOS/../SharedSupport/libboost_thread.dylib: unknown required load command 0x80000022
participants (3)
-
David M. Cotter
-
Paul A. Bristow
-
Steven Watanabe