【问题标题】:Compile Poco Library for iPhone5S (arm64)为 iPhone5S (arm64) 编译 Poco 库
【发布时间】:2013-10-20 15:18:43
【问题描述】:

我想为 iPhone5S(arm64) 编译 Poco 库。但是,我遇到了以下编译错误。

步骤

./configure --config=iPhone -static --no-tests --no-samples --omit=Data/ODBC,Data/MySQL 使 IPHONE_SDK_VERSION_MIN=4.3 POCO_TARGET_OSARCH=arm64 -s -j4

发现以下错误。

/Users/edrictse/Downloads/poco-1.4.6p2-all/build/script/makedepend.gcc src/LogFile.cpp /Users/edrictse/Downloads/poco-1.4.6p2-all/Foundation/.dep/ iPhoneOS/arm64/LogFile.d /Users/edrictse/Downloads/poco-1.4.6p2-all/Foundation/obj/iPhoneOS/arm64/debug_static /Users/edrictse/Downloads/poco-1.4.6p2-all/Foundation/obj/ iPhoneOS/arm64/release_static /Users/edrictse/Downloads/poco-1.4.6p2-all/Foundation/obj/iPhoneOS/arm64/debug_shared /Users/edrictse/Downloads/poco-1.4.6p2-all/Foundation/obj/iPhoneOS/ arm64/release_shared -Iinclude -I/Users/edrictse/Downloads/poco-1.4.6p2-all/CppUnit/include -I/Users/edrictse/Downloads/poco-1.4.6p2-all/Foundation/include -I/Users/ edrictse/Downloads/poco-1.4.6p2-all/XML/include -I/Users/edrictse/Downloads/poco-1.4.6p2-all/Util/include -I/Users/edrictse/Downloads/poco-1.4.6p2- all/Net/include -I/Users/edrictse/Downloads/poco-1.4.6p2-all/Crypto/include -I/Users/edrictse/Downloads/poco-1.4.6p2-all/NetSSL_OpenSSL/include -I/Users/ edrictse/下载/poco-1.4.6p2-a ll/Data/include -I/Users/edrictse/Downloads/poco-1.4.6p2-all/Data/SQLite/include -I/Users/edrictse/Downloads/poco-1.4.6p2-all/Data/ODBC/include - I/Users/edrictse/Downloads/poco-1.4.6p2-all/Data/MySQL/include -I/Users/edrictse/Downloads/poco-1.4.6p2-all/Zip/include -I/Users/edrictse/Downloads/ poco-1.4.6p2-all/PageCompiler/include -I/Users/edrictse/Downloads/poco-1.4.6p2-all/PageCompiler/File2Page/include -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms /iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -mthumb -miphoneos-version-min=4.3 -Wall -Wno-sign-compare -DPOCO_BUILD_HOST=edric-macbook.local -DPOCO_HAVE_IPv6 -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_STAT64 -DPOCO_NO_SHAREDLIBS
ls: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-: 没有这样的文件或目录 /Users/edrictse/Downloads/poco-1.4.6p2-all/build/script/makedepend.gcc:第 24 行:-MM:找不到命令 ls: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-: 没有这样的文件或目录

Poco 库版本:poco-1.4.6p2 XCode 版本:5.0

谁能给我解决方案。 谢谢。

【问题讨论】:

    标签: ios openssl poco-libraries arm64


    【解决方案1】:

    我刚刚下载了 poco 库,并且能够通过以下方式轻松进行配置:

    [/tmp]:;./configure --config=iPhone -static --no-tests --no-samples --omit=Data/ODBC,Data/MySQL make IPHONE_SDK_VERSION_MIN=4.3 POCO_TARGET_OSARCH=arm64 -s -j4
    Configured for iPhone
    

    我怀疑您在此处真正需要做的是确保您的 Xcode 命令行工具已安装。当您转到 Xcode 首选项时,您是否已将它们安装并设置为最新版本,像这样?

    可以从http://developer.apple.com/downloads 下载命令行工具(如果您在该弹出菜单中看不到它们)

    【讨论】:

    • 迈克尔,感谢您的回复。我仔细检查了命令行工具是否安装了 XCode 5.0.1 版本。但是,编译错误仍然存​​在。 make IPHONE_SDK_VERSION_MIN=4.3 POCO_TARGET_OSARCH=arm64 -s -j4 ls: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-: 没有这样的文件或目录 ls: /Developer/Platforms/iPhoneOS. platform/Developer/usr/bin/llvm-g++-:没有这样的文件或目录
    【解决方案2】:

    最后我想出了这个thread的解决方案。

    第一步:配置

    ./configure —config=iPhone —static —no-tests —no-samples --omit=Data/ODBC,Data/MySQL

    对于 OpenSSL 支持

    ./configure —config=iPhone —static —no-tests —no-samples --omit=Data/ODBC,Data/MySQL --include-path=[OPENSSL INCLUDE PATH]

    第 2 步:更改编译

    在“poco-1.4.6p2-all/build/config/iPhone”中打开文件,更改:

    • 对于 CC:xcrun -find -sdk iphoneos clang
    • 对于 CXX:xcrun -find -sdk iphoneos clang++

    第 3 步:制作你的库

    • 使 IPHONE_SDK_VERSION_MIN=3.0 POCO_TARGET_OSARCH=armv6 -s -j4
    • 使 IPHONE_SDK_VERSION_MIN=3.2 POCO_TARGET_OSARCH=armv7 -s -j4
    • 使 IPHONE_SDK_VERSION_MIN=4.3 POCO_TARGET_OSARCH=armv7s -s -j4
    • 使 IPHONE_SDK_VERSION_MIN=4.3 POCO_TARGET_OSARCH=arm64 -s -j4

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多