|
Boost Users : |
From: John A Meinel (boost_at_[hidden])
Date: 2005-01-12 04:10:53
Gennadiy Rozental wrote:
>>Is this just a problem with dynamic libraries on Mac, that they can't
>>have undefined symbols? Or is it something else?
>>
>>
>
>It's possible. I may need to add special support for that (the same as DLL
>in windows). If you figure out answer please let me know (including a
>solution preferably ;))
>
>
>
This might be a solution:
http://developer.apple.com/technotes/tn2002/tn2064.html#Section2
Weak linking allows you to link a symbol such that the symbol does not
have to be present at runtime for the binary to continue running. Of
course, your program can't actually try to use the symbol if it is
non-existent, or it will crash. Instead, your code should check to see
if the address of the symbol is NULL. If it is, then the symbol is not
available, but if the address is a real address, then the symbol exists
and can be used.
I don't know that this is *quite* what we want, but weak-linking seems
like it might be okay.
>>If it just means that you can only use the static library, that's fine.
>>But why is it compiling the dynamic ones on Mac if they won't succeed?
>>
>>
>
>There is guard in Jamfile preventing dynamic libraries to be build on NT box
>We could extend it to cover Mac. But in any case you could just ignore it.
>Static libraries supposed to be build anyway.
>
>Gennadiy
>
>
>
I would say this should be implemented first, but you might try the weak
linking as well.
Also, why do the libraries on darwin not have any endings?
On win I get "boost_python-vc71-mt-gd-1_3.dll", but on darwin I get
libboost_python-d-1_32.dylib
Maybe it's a 1.32 vs 1.31 thing, but I doubt it.
And finally, I'm getting a problem when I try to link for:
illegal reference to symbol: _PyBool_FromLong
I'm trying to track it down, and first I'm going to switch back to
Jamfiles to make sure I'm passing the right flags.
What's weird is that I get this error if I pass -lboost_python-1_32
If I pass -lboost_python, I don't get this error, but I get a whole list
of undefined symbols. What's really weird is I can't figure out what it
is binding against. Because if it didn't find the library it complains
about not finding a requested library.
John
=:->
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