2011-06-08 77 views
1

有谁知道在哪里可以获得python-MySQLdb编译为arm iPhone架构吗?或如何做到这一点? 我stucked在这一点上:python-MySQLdb iphone

:~/MySQL-python-1.2.3 root# python setup.py build 
running build 
running build_py 
copying MySQLdb/release.py -> build/lib.darwin-10.5-arm-2.5/MySQLdb 
running build_ext 
building '_mysql' extension 
arm-apple-darwin9-gcc -undefined dynamic_lookup -dynamiclib build/temp.darwin-10.5-arm-2.5/_mysql.o -L/usr/local/arm-apple-darwin/lib/ -L/private/var/root/mysql/lib/mysql -lmysqlclient_r -lz -lm -o build/lib.darwin-10.5-arm-2.5/_mysql.dylib 
ld: library not found for -lmysqlclient_r 
collect2: ld returned 1 exit status 
error: command 'arm-apple-darwin9-gcc' failed with exit status 1 

回答

0

我解决了前面的问题.....这是线程=在site.cfg真的,我不得不把假。 现在我真的有类似

python setup.py build 
running build 
running build_py 
copying MySQLdb/release.py -> build/lib.darwin-10.5-arm-2.5/MySQLdb 
running build_ext 
building '_mysql' extension 
arm-apple-darwin9-gcc -undefined dynamic_lookup -dynamiclib build/temp.darwin-10.5-arm-2.5/_mysql.o -L/usr/local/arm-apple-darwin/lib/ -L/private/var/root/mysql/lib/mysql -lmysqlclient -lz -lm -o build/lib.darwin-10.5-arm-2.5/_mysql.dylib 
ld: library not found for -lm 
collect2: ld returned 1 exit status 
error: command 'arm-apple-darwin9-gcc' failed with exit status 1 

这是需要-lm库的另一个问题? (例如-lz需要zlib库)。