$ python-config --ldflags
-L/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7 -u _PyMac_Error Python.framework/Versions/2.7/Python
它打印Python.framework/Versions/2.7/Python
而非/Library/Frameworks/Python.framework/Versions/2.7/Python
尝试在Makefile
中使用它时,它不适用于python-config --ldflags
,但如果我接受输出并将Python.framework/Versions/2.7/Python
更改为/Library/Frameworks/Python.framework/Versions/2.7/Python
,则效果非常好。
python-config
输出的解决方案
makefile。gcc version 4.2.1