[Gdal-dev] Re: undefined python objects

Christopher Fonnesbeck chris at fonnesbeck.org
Mon Dec 1 17:09:48 EST 2003


On Dec 1, 2003, at 4:11 PM, Sean Fulton wrote:

>> I am trying to compile GDAL on OSX with python support, but I get the  
>> following errors on building:
>> <SNIP>
>> The only advice I have seen so far is to compile without python  
>> support, but thats not really a solution. Python support is the only  
>> reason I am looking to use GDAL.
>>
>> Thanks in advance,
>
> Chris,
>
> The python that comes with OS X isn't set-up the way it is on other  
> OSs. There is no shared library (i.e. libpython.so or  
> libpython.dylib), at least on 10.2, to which GDAL can link . I *think*  
> 10.3 has python as a framework in which case you may be able to link  
> against /Library/Frameworks/Python.framework/Versions/Current/Python  
> by passing '-framework Python' to the linker. Or you could try  
> creating a soft link from  /path/to/lib/libpython2.3.dylib to  
> /Library/Frameworks/Python.framework/Versions/Current/Python.
>
> I think you can build python as a framework by hand if you're not on  
> Panther. Searching python.org will probably be more useful than I have  
> been. The GDAL developers probably don't have the time or resources to  
> hunt down platform inconsistencies like this, so I'm sure they'd  
> appreciate any help in resolving it.
>
> Good luck, and let us know if you get it working!
>
> 	Sean
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at remotesensing.org
> http://remotesensing.org/mailman/listinfo/gdal-dev
>
>

I have used "-framework Python" as the python link arguments, and based  
on the build output, I think it finds it:

  g++ -Wall -O2 -I../port -I../port -I../gcore -I../ogr  
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ 
python2.3  
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ 
python2.3 -c gdalnumeric.cpp -o gdalnumeric.o >/dev/null 2>&1

It still, however, gets the undefined symbols that I cited previously.  
If it finds the framework, then the problem lies elsewhere, doesnt it?

Thanks again,
Chris


--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia




More information about the Gdal-dev mailing list