【发布时间】:2014-06-17 23:50:12
【问题描述】:
尝试在 OS X 10.7 上安装 PyQt:
g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o w_qpyopengl.app/Contents/MacOS/w_qpyopengl -F/usr/local/Cellar/qt/4.8.6/lib -L/usr/local/Cellar/qt/4.8.6/lib -framework QtGui -L/opt/X11/lib -L/usr/local/Cellar/qt/4.8.6/lib -F/usr/local/Cellar/qt/4.8.6/lib -framework QtCore
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.5.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [w_qpyopengl.app/Contents/MacOS/w_qpyopengl] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2
Make 文件被配置为
python configure.py -d /Library/Python/2.7/site-packages/ -g -q /usr/local/bin/qmake --use-arch=x86_64
$PATH 是
/usr/local/bin/brew:/Users/username/anaconda/bin:/usr/local/lib/python2.7/site-packages:/usr/local/sbin:/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin:/usr/local/smlnj-110.75/bin
$LIBRARY_PATH 是
$ echo $LIBRARY_PATH
/usr/lib:
我已经尝试过 sym 将 /usr/lib 链接到 /opt/X11/lib(它不存在)。 crt1.10.5 可以在
找到PyQt-mac-gpl-4.11 solidblanc$ locate crt1.10.5
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.7.sdk/usr/lib/crt1.10.5.o
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/lib/crt1.10.5.o
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.10.5.o
/usr/lib/crt1.10.5.o
不知道该怎么办。
【问题讨论】:
标签: python macos pyqt homebrew