[C++-sig] Building boost.python on Mac OS X
Jonathan Brandmeyer
jbrandmeyer at earthlink.net
Sat Sep 13 01:57:15 CEST 2003
On Fri, 2003-09-12 at 19:39, Jonathan Brandmeyer wrote:
> Thanks for these pointers. Based on that information and your public
> build logs, I was able to build and link libboost_python.dylib and our
> extension module against a non-framework installation of Python2.3. The
> following make rule does the job for libboost_python.dylib:
> libboost_python.dylib: $(BOOST_OBJS)
> ld -w -d -u -o libboost_python.lo $^
g++ -w -dynamic -undefined suppress -flat_namespace -o $@ \
libboost_python.lo
> rm -f libboost_python.lo
>
> Since all of the resulting undefined symbols are in the python2.3
> executable, they are resolved at module-load time. The two-stage
> linking is a mystery to me, but I did not need to force the linker flags
> for the second stage.
>
"-flat_namespace" is also required due to the "-undefined suppress".
-Jonathan Brandmeyer
More information about the Cplusplus-sig
mailing list