Porting cURL to Android as Static Library

For a few months now we have been working on a new game for the iPhone. Although the main target iOS, I have been frequently making sure that the game works correctly on the Android, too, using the Android NDK. There was only one component that was missing for a long time – cURL on the Android side.

A lot has been written about this topic. Following advice from the last link, I eventually managed to build the library. To save you troubles going through all the steps, here it is for armeabi and armeabi-v7a.

Categories: Codify
Tags: , , , ,

  • Claudio Veas

    Sorry the “Here it is ” procedure leads to a no page error

  • Jan

    It works for me now, please let us know if it still doesn’t work.

  • Serngawy

    Hi, thanks for your effort and I want to ask if I want to use CURL lib with my NDK application only that I need to include this header file with my source? if yes would you support me with the Android.mk file cause i have to modified to add my source


  • Jan

    You will need to include both the library and the header files. The specific portion of my Android.mk looks like this:

    LOCAL_MODULE := curl
    LOCAL_SRC_FILES := libs/curl/lib/$(TARGET_ARCH_ABI)/libcurl.a
    LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/libs/curl/inc


  • Shrini

    Does this have some problem with Samsung SII ? I get crashes even before application launches, and crash logs are not interpretable with ndk-stack or addr2line tools

  • Jan

    I successfully used it on my Nexus S. Unfortunately, I cannot help you with this specific device, since I don’t have access to an SII.

  • Shrini

    Thanks Jan, I could run it successfully on Motorola Xoom, but in Samsung it crashes, since i use it as shared library i can not interpret the commands

  • Jimbobkr

    Thank you very much for providing this. It’s really been a help!

  • Kiemdt1

    Thank you very much

  • uranium

    Hi, as far as I understood the library is built without ssl. Can you please build withh SSL support please?

  • ukhan


    Could you please post the instructions on how you got it to build? Thanks

  • ME

    Hi, Can you tell us how to install/use it on the project

  • Mustafa Korkmaz

    Thanks a lot for this. But it looks like armeabi folder has v7 lib and armeabi-v7 has the vanilla lib.