【发布时间】:2016-09-15 06:21:29
【问题描述】:
我想配置一个 c 库来使用 Xcode。我对此很陌生,找不到太多关于此的信息。首先,我尝试创建一个静态库来拖放所有 c 文件,但它没有工作,因为它具有依赖关系。我要更改为 iOS 的库是 net-snmp 。进一步调查我发现我们可以使用 configure 、 make 命令将 c 库更改为特定于 iOS 的库。我按照教程并尝试在终端中使用以下命令进行配置,但最终出现错误。
./configure --disable-shared --enable-utf8 --host=arm-apple-darwin CFLAGS="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk" CXXFLAGS="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk" LDFLAGS="-L." CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc" CXX="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++"
错误是
configure: error: You are cross-compiling, but you have not specified the target's endianness
我不确定我是否在正确的轨道上。如果有人成功地将 c 库更改为特定于 iOS 的.?如果是的话怎么做.?任何帮助表示赞赏。
谢谢
【问题讨论】:
标签: ios c static-libraries net-snmp