android
include libjpeg in a NDK build
As specified in this answer, I downloaded libjpeg 8d from github and placed it in a folder {ANDROID_APP}/jni/libjpeg. This library has it's own Android.mk, so I tried to include it at the end of my {ANDROID_APP}/jni/Android.mk this way : include $(LOCAL_PATH)/libjpeg/Android.mk Note : I'm using the latest version of android NDK (r8c) After running ndk-build, I still get this error : ANDROID_APP/jni/libfoo/foo_analysis.c:36:21: fatal error: jpeglib.h: No such file or directory This is the structure of my global Android.mk : LOCAL_PATH := $(call my-dir) # libFoo include $(CLEAR_VARS) LOCAL_MODULE := libfoo LOCAL_MODULE_FILENAME := libfoo LOCAL_SRC_FILES := libfoo/foo.c libfoo/foo_analysis.c libfoo/foo_extract.c LOCAL_STATIC_LIBRARIES := libbmp # declared previously but not shown in this example LOCAL_CFLAGS = ${FLAGS} LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/libfoo LOCAL_EXPORT_LDLIBS := -llog include $(BUILD_STATIC_LIBRARY) # libBar include $(CLEAR_VARS) LOCAL_MODULE := libbar LOCAL_MODULE_FILENAME := libbar LOCAL_SRC_FILES := bar/bar.c LOCAL_STATIC_LIBRARIES := libfoo LOCAL_CFLAGS = ${FLAGS} LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/bar LOCAL_EXPORT_LDLIBS := -llog include $(BUILD_STATIC_LIBRARY) # callbar LOCAL_MODULE := libcallbar LOCAL_MODULE_FILENAME := libcallbar LOCAL_SRC_FILES := com_androidapp_nativeC_callbar.c LOCAL_STATIC_LIBRARIES := libbar LOCAL_CFLAGS = ${FLAGS} include $(BUILD_SHARED_LIBRARY) #libjpeg include $(LOCAL_PATH)/libjpeg/Android.mk I tried to use LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/libfoo $(LOCAL_PATH)/libjpeg and LOCAL_C_INCLUDES := $(LOCAL_PATH)/libjpeg in the libFoo module, but I still get the same error.
Just looked at Android.mk in jpeg8d-master folder and seems to be it has nothing. I was trying to compile library directly according to STANDALONE-TOOLCHAIN.HTML I do next: $export NDKROOT=/home/alex/tools/android-ndk-r8c (where is your NDK) $export SYSROOT=$NDKROOT/platforms/android-9/arch-arm (or any other android platform) but files from jpeg8d-master have windows \r symbols and I deleted config.guess, config.sub, depcomp than use $automake -a command. And replace ltmain.sh from glib-2.34.0 than $./configure CC="$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=$SYSROOT" --host=arm-linux-androideabi $make next try prebuilts feature NDK - How to use a generated .so library in another project and NDK/PREBUILTS.HTML
Related Links
how to detect and notify user of message from server?
How to Consume Web Api in xamarin CrossPlatform Application
Is it possible to develop Android Native apps on cyanogenmod?
Android L - Sliding menu that overlaps actionbar
NoClassDefFoundError while trying to run unit tests on Android Studio
add scroll tabs between some layouts
How to access/report to Game Center from non BaseGameActivity
Is there a way to get current activity's layout and views via adb?
MapView in a Dialog
Setting a Bundle as user data in account manager
Swipe View with buttons in a relativeLayout, out of the fragment
Android Galler Import not working
Wait until Text to Speech is speaking
How do I ensure that users always enter the app where they left off?
Android: Create circle looks button with background image
Android: How to avoid fetching images everytime from Parse if there are cache files already?