cURL / Mailing Lists / curl-library / Single Mail

curl-library

Curl and android

From: Jean-Bernard Collet <collet.jb_at_gmail.com>
Date: Wed, 23 Jun 2010 14:39:40 +0200

Hi,

I'm trying to compile Curl to use it an Android.

I've downloaded the last version and I've the last version of Android NDK
(r4).

First, I've simply tryed to copy the archive's content into a repertory and
launch the "ndk-build" command. It resulted in this :

[code]
MagicCookie:jni jb$ ndk-build
Android NDK: Trying to define local module 'curl' in
/Users/jb/Documents/workspace/curljni/project/jni/Android.mk.
Android NDK: But this module was already defined by
/Users/jb/Documents/workspace/curljni/project/jni/Android.mk.
/Users/jb/Documents/android/android-ndk-r4/build/core/build-executable.mk:33:
*** Android NDK: Aborting. . Stop.
[/code]

Then, I tryed without the first part of the Android make file (Android.mk),
simply to get the curl binaries. It resulted in this :

[code]
(...)
/Users/jb/Documents/workspace/curljni/project/jni/src/main.c:5518: error:
'struct Configurable' has no member named 'errors'
/Users/jb/Documents/workspace/curljni/project/jni/src/main.c: In function
'create_dir_hierarchy':
/Users/jb/Documents/workspace/curljni/project/jni/src/main.c:5654: warning:
nested extern declaration of 'access'
/Users/jb/Documents/workspace/curljni/project/jni/src/main.c:5654: error:
'F_OK' undeclared (first use in this function)
[/code]

I guest it si because I never launched the "configure" command. I tryed this
:

[code]
MagicCookie:jni jb$ ./configure --host=arm-linux
CC=/Users/jb/Documents/android/android-ndk-r4-crystax/build/prebuilt/darwin-x86/arm-eabi-4.4.0/bin/arm-eabi-gcc
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 curl debug memory tracking... no
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-linux-ar... no
checking for ar... /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-linux-strip... no
checking for strip... strip
checking curl version... 7.20.1
checking build system type... i386-apple-darwin10.4.0
checking host system type... arm-unknown-linux-gnu
checking for style of include used by make... GNU
checking for arm-linux-gcc...
/Users/jb/Documents/android/android-ndk-r4-crystax/build/prebuilt/darwin-x86/arm-eabi-4.4.0/bin/arm-eabi-gcc
checking whether the C compiler works... no
configure: error: in `/Users/jb/Documents/workspace/curljni/project/jni':
configure: error: C compiler cannot create executables
See `config.log' for more details.
[/code]

But without more luck...

Can someone help me ? My goal is to get the compiled library to link and
embed into my application...

Thanks a lot...

-- 
Jb Collet
-----------------------------------------------------------
Student - Master 2
University of Namur
phone: +32 499 35 43 37
email:  collet.jb_at_gmail.com
-----------------------------------------------------------

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-23