title: use libcryto.so and libssl.so in an android project?
body: <p>I'm beginer to Android NDK. I want to build a RSA example base on openssl libary. 
  First, I built libssl.so and libcrypto.so  librairies with ndk-build in the guardianproject. 
  Next, I create a new sample project to  integrate libary (libss.so &amp; lybcryto.so). I follow the same in this <a href="https://stackoverflow.com/questions/18248362/how-to-install-openssl-so-and-libssl-so-in-an-android-project">post</a></p>
  
  <p>My App directory</p>
  
  <pre><code>TrialApp
  |
  |--&gt;Activity.java (includes System.LoadLibrary calls)
  |
  |--&gt;jni
      |--&gt;TestJNI2.cpp
      |
      |--&gt;Android.mk
      |
      |--&gt;includes
      |   |
      |   |--&gt;openssl (dir containing *.h files)
      |
      |--&gt;precompiled
         |--&gt;libssl.so
         |--&gt;libcrypto.so
  </code></pre>
  
  <p>My android.mk: </p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  
  # Prebuilt libssl
  include $(CLEAR_VARS)
  LOCAL_MODULE := ssl
  LOCAL_SRC_FILES := precompiled/libssl.so
  include $(PREBUILT_SHARED_LIBRARY)
  
  # Prebuilt libcrypto
  include $(CLEAR_VARS)
  LOCAL_MODULE := crypto
  LOCAL_SRC_FILES := precompiled/libcrypto.so
  include $(PREBUILT_SHARED_LIBRARY)
  include $(CLEAR_VARS)
  
  c_includes := $(LOCAL_PATH)
  cf_includes := includes/openssl
  
  cf_includes := $(addprefix -Ijni/,$(cf_includes))
  
  export_c_includes := $(c_includes)
  
  LOCAL_MODULE := security
  LOCAL_SRC_FILES := TestJNI2.cpp
  LOCAL_CFLAGS += $(cf_includes)
  LOCAL_EXPORT_C_INCLUDES := $(export_c_includes)
  LOCAL_LDLIBS := -llog
  LOCAL_LDLIBS += $(LOCAL_PATH)/precompiled/libssl.so
  LOCAL_LDLIBS += $(LOCAL_PATH)/precompiled/libcrypto.so
  
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>TestJNI2.cpp</p>
  
  <pre><code>/* OpenSSL headers */
  
  #include "openssl/bio.h"
  #include "openssl/ssl.h"
  #include "openssl/err.h"
  
  /* Initializing OpenSSL */
  
  void init_openssl(void){
      SSL_load_error_strings();
      ERR_load_BIO_strings();
      OpenSSL_add_all_algorithms();
  }
  </code></pre>
  
  <p>Then when i build with ndk-build always have problems like this </p>
  
  <pre><code>/data/workspace/TestJNI2/jni/TestJNI2.cpp:3:25: error: openssl/bio.h: No such file or directory
  /data/workspace/TestJNI2/jni/TestJNI2.cpp:4:25: error: openssl/ssl.h: No such file or directory
  /data/workspace/TestJNI2/jni/TestJNI2.cpp:5:25: error: openssl/err.h: No such file or directory
  /data/workspace/TestJNI2/jni/TestJNI2.cpp: In function 'void init_openssl()':
  /data/workspace/TestJNI2/jni/TestJNI2.cpp:10: error: 'SSL_load_error_strings' was not declared in this scope
  /data/workspace/TestJNI2/jni/TestJNI2.cpp:11: error: 'ERR_load_BIO_strings' was not declared in this scope
  /data/workspace/TestJNI2/jni/TestJNI2.cpp:12: error: 'OpenSSL_add_all_algorithms' was not declared in this scope
  make: *** [/data/workspace/TestJNI2/obj/local/armeabi/objs/security/TestJNI2.o] Error 1
  </code></pre>
  
  <p>Can anyone help me? Or how to build an example RSA algorthim base on openssl lib?  </p>