I'm working on an Android NDK project, and I would like to use the libcurl library to download resources from C++. I am using the NDK's built-in ndk-build tool. During build, I get the following error:
Build command failed.
Error while executing process /Users/afarm/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/afarm/AndroidStudioProjects/NativeOpenGL/engine/Android.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=1 APP_PLATFORM=android-15 NDK_OUT=/Users/afarm/AndroidStudioProjects/NativeOpenGL/engine/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/afarm/AndroidStudioProjects/NativeOpenGL/engine/build/intermediates/ndkBuild/debug/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: /Users/afarm/AndroidStudioProjects/NativeOpenGL/engine/Android.mk: Cannot find module with tag 'libcurl' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
Here is my Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := engine-core
LOCAL_CFLAGS := -Wall -Wextra
APP_CPPFLAGS := -std=c++11
APP_STL := gnustl_static
NDK_TOOLCHAIN_VERSION := clang
LOCAL_SRC_FILES := src/main/cpp/rendererwrapper.cpp \
src/main/cpp/renderer.cpp \
src/main/cpp/ShaderProgram.cpp \
src/main/cpp/SimpleShaderProgram.cpp \
src/main/cpp/NativeOpenGLShaderPrograms.c
LOCAL_STATIC_LIBRARIES := libcurl
LOCAL_LDLIBS := -llog -lGLESv2 -landroid
include $(BUILD_SHARED_LIBRARY)
$(call import-add-path,src/main/cpp)
$(call import-module,libcurl)
I have downloaded the curl/libcurl release and placed it in the src/main/cpp/ directory. I'm looking for a way to include libcurl in the project. To be clear, I want to use the official libcurl release (not a ported version).