如何在macosx下用arch armv7s编译libcurl?

时间:2012-09-28 08:25:19

标签: macos libcurl cross-compiling

我在计算机上安装了Xcode 4.5和iOS6.0 SDK,MacOSX 10.7 SDK,命令行工具。我从http://curl.haxx.se/download/curl-7.27.0.tar.gz下载libcurl并使用arch armv7s为iOS编译。

我确实遵循了:

  1.   

    export CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s"

         

    export LDFLAG =“ - isysroot   /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk   --Wl,-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk“

         

    export CFLAG =“ - isysroot   /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk“

  2.   

    ./ configure --host = arm-apple-darwin10

  3. 并在下面收到错误:

        $ ./configure --host=arm-apple-darwin10
    configure: WARNING: If you wanted to set the --build type, don't use --host.
        If a cross compiler is detected then cross compile mode will be used.
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking whether to enable debug build options... no
    checking whether to enable compiler optimizer... (assumed) yes
    checking whether to enable strict compiler warnings... no
    checking whether to enable compiler warnings as errors... no
    checking whether to enable curl debug memory tracking... no
    checking whether to enable hiding of library internal symbols... yes
    checking whether to enable c-ares for DNS lookups... no
    checking for sed... /usr/bin/sed
    checking for grep... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for arm-apple-darwin10-ar... no
    checking for ar... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking for arm-apple-darwin10-strip... no
    checking for strip... strip
    checking curl version... 7.27.0
    checking build system type... i386-apple-darwin12.2.0
    checking host system type... arm-apple-darwin10
    checking for style of include used by make... GNU
    checking for arm-apple-darwin10-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s
    checking for C compiler default output file name... 
    configure: error: in `/Users/eric/working/curl-7.27.0':
    configure: error: C compiler cannot create executables
    See `config.log' for more details.
    

    有谁知道怎么做?

0 个答案:

没有答案