简体   繁体   English

CC libcurl适用于ARMv7

[英]CC libcurl for ARMv7

I am attempting to cross compile libcurl for ARMv7(Android) and I cannot seem to get it to compile. 我正在尝试为ARMv7(Android)交叉编译libcurl,但似乎无法对其进行编译。

I have the SDK and NDK with a standalone tool chain and CC already set up. 我拥有带有独立工具链的SDK和NDK,并且已经设置CC。 Though while CC is set it breaks the compiler. 虽然在设置CC时会破坏编译器。

For example, I have my toolchain set in my bashrc like so: 例如,我在bashrc中设置了工具链,如下所示:

export NDK=/home/anthony/android-ndk-r9b
export SYSROOT=$NDK/platforms/android-16/arch-arm
export CC="$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc-4.8 --sysroot=$SYSROOT"

If i leave CC uncommented, I recieve an error while trying to CC libcurl: 如果我不评论CC,则尝试CC libcurl时会收到错误消息:

curl-7.46.0 $ ./configure$ prefix=/home/anthony/Documents/Ruby/androidSMS/Curl/curl-7.46.0/lib/curl 
--build=i686-pc-linux-gnu --host=arm-linux-gnueabi 
--target=arm-linux 
CC=/home/anthony/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc-4.8


checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
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 whether to disable dependency on -lrt... (assumed no)
checking for path separator... :
checking for sed... /bin/sed
checking for grep... /bin/grep
checking for egrep... /bin/grep -E
checking for arm-linux-gnueabi-ar... /usr/bin/arm-linux-gnueabi-ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for arm-linux-gnueabi-gcc... /home/anthony/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc-4.8
checking whether the C compiler works... no
configure: error: in `/home/anthony/Documents/Ruby/androidSMS/Curl/curl-7.46.0':
configure: error: C compiler cannot create executables
See `config.log' for more details

I have to open a new terminal after commenting CC out. 评论CC后,我必须打开一个新终端。 unsetting CC will not work. 取消设置CC无效。 Thats besides the point. 那不是重点。 Can someone please tell me what I'm doing wrong. 有人可以告诉我我在做什么错。

I wrote an ftp class instead of cross compiling libcurl for ARMv7. 我写了一个ftp类,而不是为ARMv7交叉编译libcurl。 Closing this out. 结束这个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM