I am compiling a program that embeds Python, in particular Python v3.1. On my system I have several versions of the Python framework: 3.1, 2.5, 2.6. When I pass "-framework Python" to g++ when compiling, g++ seems to pull in version 2.6 (lives at "/System/Library/Frameworks/") instead of version 3.1 (lives at "/Library/Frameworks/"), resulting in an error. Both paths are in the framework search path, as is evident from attempting the same compilation in verbose mode (passing in -v to g++).
Although this would seem to be a simple thing, I have not been able to find mention of it in any documentation about g++, ld or xcode. Currently, I accomplish successful compilation by moving /System/Library/Frameworks/Python.framework to /System/Library/Frameworks/Python.framework.moved, but this is un ugly, temporary solution.
So, does anyone know what the best way of resolving this issue? In particular, I would like to be able to compile this program against the correct version of the Python framework, regardless of any other versions installed on the system.
Thanks.