I just compiled OpenSSL for Android. I have libcrypto.so and libssl.so libraries. I created a sample Android application called TrialApp. The idea is to use some native functions that will call the libssl and libcrypto libraries. So in my jni directory, I have TrialApp.cpp that includes a simple SHA1 example. Here is the tree structure of my Eclipse NDK application directory:
TrialApp
|
|
|
|
|
|
|
|
|
|
|
| |
| |
|
|
|
|
Here is the Android.mk file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := TrialApp
LOCAL_SRC_FILES := TrialApp.cpp
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/includes/openssl
LOCAL_LDLIBS := -llog
LOCAL_LDLIBS += $(LOCAL_PATH)/precompiled/libssl.so
LOCAL_LDLIBS += $(LOCAL_PATH)/precompiled/libcrypto.so
LOCAL_STATIC_LIBRARIES := sslx cryptox
include $(BUILD_SHARED_LIBRARY)
But then the openssl headers in TrialApp, .cpp cannot be found by the compiler.
The error I get: fatal error: openssl / evp.h: no such file or directory
Can someone tell me how to solve it? Thank.