title: Including OpenSSL library in custom C++ library?
body: <p>I would like to write a security framework for mobile applications. The framework should not depend on a certain target platform (e.g. android). Therefore i want to use C++ and build my custom 'library' for the specific platforms (namely android in first step, maybe ubuntu touch later on). I want to use the framework for adding security relevant features in a modular fashion to any of my apps. For the very basic features, such as encryption, i want to use a accepted and common encryption library like openSSL. </p>
  
  <p>In advance i read some articles about building C++ Libraries for Android (and wrapping them in JNI). For example i read the guide how to build openSSL for Android:
  <a href="https://wiki.openssl.org/index.php/Android" rel="nofollow">https://wiki.openssl.org/index.php/Android</a> </p>
  
  <p>And this:
  <a href="http://kvurd.com/blog/compiling-a-cpp-library-for-android-with-android-studio/" rel="nofollow">http://kvurd.com/blog/compiling-a-cpp-library-for-android-with-android-studio/</a></p>
  
  <p>(both descriptions are linux specific, ... i'm using windows)</p>
  
  <p>But i still have a very general question. I'm no c++ expert (i'm more familar with the java world indeed) and this is my first own 'library' ever. Is it possible to integrate or wrap an existing library like openSSL in my framework, so that i will have both 'packaged' together in one library which i can include in my mobile apps? (like using a .jar file in a java project and export this file together with the new code) Or will i have to build the framework and openSSL as seperate libraries for e.g. android? How could i reference from my framework to openSSL in this case?</p>
  
  <p>Or is there even an easier way to provide such a framework in an 'cross-platform' way? I would totally prefer to write everything in java code and use a java library but i guess it would be difficult (or impossible) to use my framework for iOs or Ubuntu touch then...</p>
  
  <p>I know even with the C++ way will be additional work necessary in android (writing the JNI wrapper). My aim is to re-use as much functionallity and code on the different platforms as possible. 
  Any suggestion and hints are very welcome. Many thanks in advance.</p>
  
  <p>UPDATE: I would like to use a dynamic lib, but i also accept answers for static solutions if that is more feasible.</p>