I've had good luck building C-language extensions for my Python work, at
least up until now. I've got a C file which #includes Carbon.h as well as
the canonical Python.h. Attempting to use distutils to build it fails with
the error message:

ld: build/temp.darwin-7.7.0-Power_Macintosh-2.3/MacUtils/macutilsmodule.o
illegal reference to symbol: _FSPathMakeRef defined in indirectly referenced
dynamic library 
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb
onCore.framework/Versions/A/CarbonCore

when executing this line:

gcc -Wl,-F. -bundle -framework Python
build/temp.darwin-7.7.0-Power_Macintosh-2.3/MacUtils/macutilsmodule.o -o
build/lib.darwin-7.7.0-Power_Macintosh-2.3/macutilsbackend.so

So I tried recompiling/linking by using the same line but adding "-framework
Carbon" and the .so built with no complaints. However, once I installed it
and tried to import it, I got this from Python:

ValueError: module functions cannot set METH_CLASS or METH_STATIC

What does this mean? I searched the mail.python.org list and saw a post back
in April, 2004 from someone else who saw this exact same line, but nobody
every replied to that message.

More generally, I'd like to know the answer to this: How do I specify
changes to the gcc lines that distutils runs when it builds? Is there a way
(short of modifying distutils themselves) to specify optional and/or
additional arguments to these commands?

Thanks for any help or pointers!
Dave Opstad

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to