Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find header files - Android NDK

i'm wrapping a native API to Android by NDK.

But when building it don't find the header files.

I have the following structure.

project/jni

Android.mk

LOCAL_PATH := $(call my-dir)

include $(call all-subdir-makefiles)

LOCAL_PATH :=/home/marcos/dev/workspace/rmsdk.native.wraper/jni

include $(CLEAR_VARS)

LOCAL_LDLIBS := -llog
LOCAL_MODULE    := ndk1
LOCAL_SRC_FILES := native.c DelegateDRMProcessorClient.cpp
LOCAL_STATIC_LIBRARY := adept cryptopenssl dp expat fonts hobbes jpeg mschema png t3 xml zlib

include $(BUILD_SHARED_LIBRARY)

project/jni/prereqs/

Android.mk (Used to call all subdirs Android.mk files)

LOCAL_PATH := $(call my-dir)
include $(call all-subdir-makefiles)
include $(CLEAR_VARS)

project/jni/prereqs/%lib%/

Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    :=dp
LOCAL_SRC_FILES :=libdp.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include

include $(PREBUILT_STATIC_LIBRARY)

And there's a include folder on each %lib% folder.

When using ndk-build I get a "/home/marcos/dev/workspace/rmsdk.native.wraper/jni/DelegateDRMProcessorClient.h:18:20: error: dp_all.h: No such file or directory"

Anyone knows how to include these header to be available to the compiler?

like image 986
Marcos Vasconcelos Avatar asked Jan 04 '11 14:01

Marcos Vasconcelos


1 Answers

I solve it, getting all the headers in a folder and including the following line in the Android.mk

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include-all

This works, but not looks like the best approach.

like image 152
Marcos Vasconcelos Avatar answered Oct 01 '22 17:10

Marcos Vasconcelos