
- #Compile against libcurl android ndk for android
- #Compile against libcurl android ndk code
- #Compile against libcurl android ndk trial
- #Compile against libcurl android ndk windows
* Define to the type qualifier of arg 1 for getnameinfo. * Define if you have the utime function. * Define if you have the tcsetattr function. * Define if you have the tcgetattr function. * Define if you have the strtoll function. * Define if you have the strstr function. * Define if you have the strnicmp function. * Define if you have the strncasecmp function. * Define if you have the stricmp function. * Define if you have the strftime function. * Define if you have the strdup function. * Define if you have the strcasecmp function.

* Define if you have the socket function. * Define if you have the setvbuf function. * Define if you have the setmode function. * Define if you have the setlocale function. * Define if you have the select function. #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 This is present in OpenSSL versions after 0.9.6b */ * Define if you have the `CRYPTO_cleanup_all_ex_data' function. * Define if you have the `RAND_status' function when using SSL. * Define if you have the RAND_screen function when using SSL. * Define if you have the perror function. * Define if you have a working ioctlsocket FIONBIO function. * Define if you have the ioctlsocket function. * Define if you have the inet_addr function. * Define if you have the gettimeofday function. * Define if you have the getprotobyname function. * Define if you have the getservbyname function. * Define if you have the getpass function. * Define if you have the gethostname function. * Define if you have the gethostbyaddr function. * Define if you have the ftruncate function. * Define if you don't have vprintf but do have _doprnt. * Define if you have the closesocket function. * Define if you can safely include both and. * Define if you have the ANSI C header files. * Define if sig_atomic_t is an available typedef. * Define to 1 if you have the header file. * Define to 1 if you have a working fcntl O_NONBLOCK function.
#Compile against libcurl android ndk for android
* Hand crafted config file for Android */

At the end of the night (read: week), it resulted as follows:
#Compile against libcurl android ndk windows
It originally was the windows config file I think warped to a more linux-like configuration.
#Compile against libcurl android ndk trial
It took some trial and error, and this probably isn't totally correct, but I got curl to compile and seemingly functional with this manually constructed file. configure, but we like to do things our own way).īecause we defined HAVE_CONFIG_H (-DHAVE_CONFIG_H), curl is now instructed to look for this file when compiling. We also have to make curl know we want to use a curl_config.h file (which is normally generated with. This defines some macros needed to build curl for Android, but wait, there's more. # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t # define CURL_TYPEOF_CURL_OFF_T long long These defines MUST go in curlbuild.h unless you want to make curl angry with you.
#Compile against libcurl android ndk code
I added the following code above the "penultimate" section for MSVC. Now, you need to add a section in /include/curlbuild.h You will want the second one as is, the first can be renamed to whatever you want so long as you know this is selecting Android specific code during compilation and this is the same symbol to check for below. This would be -DANDROID_NDK and -DHAVE_CONFIG_H. but there was some "convincing" needed to be done to make this happen.įirst, I defined two symbols during compile time. I opted for using a Makefile and good old fashioned make. Two things ultimately had to be done before libcurl would successfully compile for Android using the toolchain. I used the standalone toolchain with API level 9 (gingerbread, Android 2.3) and did not use ndk-build script. Now to only get this to work on Android for games or whatever. Curl is a pretty nifty package and it can be useful on lots of platforms to provide a fairly sane way to contacting and downloading network stuff (webpages for example).
