python - Specify Framework Version on OSX -


i compiling program embeds python, in particular python v3.1. on system have several versions of python framework: 3.1, 2.5, 2.6. when pass "-framework python" g++ when compiling, g++ seems pull in version 2.6 (lives @ "/system/library/frameworks/") instead of version 3.1 (lives @ "/library/frameworks/"), resulting in error. both paths in framework search path, evident attempting same compilation in verbose mode (passing in -v g++).

although seem simple thing, have not been able find mention of in documentation g++, ld or xcode. currently, accomplish successful compilation moving /system/library/frameworks/python.framework /system/library/frameworks/python.framework.moved, un ugly, temporary solution.

so, know best way of resolving issue? in particular, able compile program against correct version of python framework, regardless of other versions installed on system.

thanks.

try first changing current symlink in python framework in /library/frameworks:

$ cd /library/frameworks/python.framework/versions $ ls -l total 4 drwxrwxr-x  8 root  admin  340 aug 31 02:10 2.6/ drwxrwxr-x  8 root  admin  340 oct  6 21:56 2.7/ drwxrwxr-x  7 root  admin  306 oct  6 14:00 3.1/ lrwxr-xr-x  1 root  admin    3 oct  7 00:33 current@ -> 2.7 $ sudo rm current $ sudo ln -s 3.1 current 

(update) hoping, without testing it, ensuring current link in /library/frameworks pointing @ right version enough. but, based on op's experimentation, need modify analogous link in /system/library well. it's bad idea modifying in /system/library because within considered part of os x , managed apple and, thus, changes make can, @ best, erased next system update and, @ worst, break system. in case, probably won't make big difference current link used in situation, is, linking embedded library. if fastidious, might consider restoring original value when finished.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -