Partial success Re: [C++-sig] boost.python on OS X 10.3 (Panther)

Rene Rivera grafik.list at
Wed Nov 5 00:20:20 CET 2003

[2003-11-04] Bob Ippolito wrote:

>On Nov 4, 2003, at 5:37 PM, Ralf W. Grosse-Kunstleve wrote:
>> --- Bob Ippolito <bob at> wrote:
>>> -bundle_loader is pretty worthless with a framework Python..
>> But as it stands right now I don't know how to get a working build  
>> without the
>> -bundle_loader switch. Did you see my other posting with the example  
>> compile &
>> link commands?
>> How would you modify these command lines?
>the last one:
>c++ -bundle -bundle_loader  
>/Library/Frameworks/Python.framework/Versions/2.3/Python -o  
>libtbx/ boost/libs/python/test/str.os -Llibtbx  
>-L/net/worm/scratch1/rwgk/hot/libtbx -lboost_python -lm
>should be:
>c++ -bundle -o libtbx/ boost/libs/python/test/str.os -Llibtbx  
>-L/net/worm/scratch1/rwgk/hot/libtbx -framework Python -lboost_python  

I wish... That is what I implemented, and what Ralf tried earlier today, and
it doesn't work.

>LDSHARED=   $(CC) $(LDFLAGS) -bundle -framework $(PYTHONFRAMEWORK)
>Basically the deal is that dyld does two level namespaces.. so except  
>in the case of umbrella frameworks or libraries (don't try and do this  
>for Python), if you don't have the symbol defined in your object file  
>it does not get exported.  Therefore, anything that uses symbols from  
>Python have to get them from the Python framework directly (I'm  
>assuming that both libboost_python and str_ext use symbols from  

The problem isn't in the use of the Python framework but in the use of the
boost_python dylib. As soon as you give the -lboost_python when building a
bundle, which seems to be statically linked, it wants to bind the symbols in
boost_python but because it's a dynamic object it complains that it can't. 

This would of course change if Boost.Python itself was built as a framework,
but that's not going to happen any time soon.

-- grafik - Don't Assume Anything
-- rrivera (at) - grafik (at)
-- 102708583 (at) icq

More information about the Cplusplus-sig mailing list