[Gdal-dev] Python Module Build
Sean Fulton
fulton at cmu.edu
Wed Apr 14 22:32:08 EDT 2004
For GDAL 1.2.0 Python linking fails on OS X as usual with:
g++ -Wl,-bind_at_load -o .libs/_gdalmodule.so -bundle
.libs/gdal_wrap.o .libs/numpydataset.o .libs/gdalnumeric.o
-L/opt/local/lib /opt/local/lib/libdl.dylib
/opt/local/lib/libjpeg.dylib ../.libs/libgdal.dylib
ld: Undefined symbols:
_PyArg_Parse
_PyArg_ParseTuple
_PyDict_New
...
I've found that running the above command with "-framework Python"
fixes this error, however, I can't find how to add "-framework Python"
to that build command through the make or autoconf files.
The configure log shows a PYTHON_LINK variable whose value contains
"-framework ${PYTHONFRAMEWORK}" but it doesn't seem to be used
anywhere.
How do I pass "-framework Python" to the build command?
Also, is there a way to specify more than one location for Python
headers and libs without mucking about in the configure script? Setting
the PYTHON_INCLUDE environment variable seems to have no effect on
configure.
Thanks.
Sean
More information about the Gdal-dev
mailing list