1

我尝试GMP用于 iPad 应用程序。

XCode 4.5.1不幸的是,由于库的架构不正确,它无法运行- armv7s.

Undefined symbols for architecture armv7s:
  "___gmpz_add", referenced from:
      _main in gmp.o
  "___gmpz_get_str", referenced from:
      _main in gmp.o
  "___gmpz_init_set_str", referenced from:
      _main in gmp.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我尝试使用 armv7 架构构建库,使用我的 XCode 但不是armv7s成功运行。

我的 armv7 配置GMP -

sudo sh ./configure CC="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2" CXX="/Applications/Xcode.app/Contents/Developer /Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2" CPP="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -E" LD="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld" CPPFLAGS="-arch armv7-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=4.2" AR="/Applications/Xcode.app/Contents/Developer /Platforms/iPhoneOS.platform/Developer/usr/bin/ar" NM="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/nm" NMEDIT="/Applications/Xcode .app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/nmedit" LIBTOOL="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool" LIPO ="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo" OTOOL="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr /bin/otool" RANLIB="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib" STRIP="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin /strip" --disable-shared --enable-static --prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/local/gmp/5.1.0/armv7 --host=none-apple-darwin10

对于armv7s:-

sudo sh ./configure CC="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2" CXX="/Applications/Xcode.app/Contents/Developer /Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2" CPP="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -E" LD="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld" CPPFLAGS="-arch armv7s-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=4.2" AR="/Applications/Xcode.app/Contents/Developer /Platforms/iPhoneOS.platform/Developer/usr/bin/ar" NM="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/nm" NMEDIT="/Applications/Xcode .app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/nmedit" LIBTOOL="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool" LIPO ="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo" OTOOL="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr /bin/otool" RANLIB="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib" STRIP="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin /strip" --disable-shared --enable-static --prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/local/gmp/5.1.0/armv7s --host=none-apple-darwin10

我试图谷歌看看是否GMP支持armv7s,但没有关于此的信息。

是不支持还是我之前的配置MAKE不正确?

4

0 回答 0