[Distutils] building a wrapper on OSX

Simon Burton simon at arrowtheory.com
Thu Jan 29 18:41:51 EST 2004

I'm having trouble linking my wrapper on OSX.
It works fine on linux. The linker complains about undefined symbols from the wrapped library.
If I use "-undefined suppress" the link happens, but then python stumbles with the same complaint
when I do the import.

ZMA:~/dsp$ python2.3 setup.py build
running build
running build_py
copying test_sndfile.py -> build/lib.darwin-6.8-Power_Macintosh-2.3
running build_ext
building 'sndfile' extension
gcc -Wl,-F. -bundle -framework Python build/temp.darwin-6.8-Power_Macintosh-2.3/sndfile.o -L/usr/local/lib -lsndfile -o build/lib.darwin-6.8-Power_Macintosh-2.3/sndfile.so
ld: Undefined symbols:
error: command 'gcc' failed with exit status 1

Somehow the info on the original libsndfile is lost.
Any ideas?


Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Ph. 61 02 6249 6940

More information about the Distutils-SIG mailing list