0

I have an android project in Eclipse which simply contains a "jni" directory containing c++ code which gets compiled into a native shared library, let's say libmod1.so. Then I have another android "front-end" project, which also contains a "jni" directory. I've set that project up to create a native shared library (let's say libwrapper.so) which I want to act as an interface to access libmod1.so, calling its functions etc.

I've seen a few questions about writing Android.mk files to express shared library dependencies but none I've seen refer to linking custom made libraries in separate Eclipse projects.

Rather than rely on a complicated make file though, if possible I'd like to instruct Eclipse to compile and copy the libmod1.so library into the "jni" directory of the "front-end" project whenever its built. From there I can compile it into the libwrapper.so library.

Does anyone know how to achieve this in Eclipse?

Or, can anyone suggest a better method of achieving the result I'm after? I'd prefer separate projects because I want to use the libmod1.so library with various "front-end" projects in future and so I want it to be in its own project.

CSharp
  • 1,396
  • 1
  • 18
  • 41
  • If I understand what I read (but no sur yet;), you can achieve this with maven (or gradle). You should be interested by this question: http://stackoverflow.com/questions/1220386/maven2-dependencies-and-native-libraries – scraaappy Jan 02 '15 at 22:41
  • If using maven or gradle is a better option, do you know of any online tutorials that describe what I'm trying to do? I had a look at the link you provided (thanks) and other tutorials but it they don't provide those details. I would have thought it would be possible to get Eclipse to do what I'm asking though? If my question's unclear I can clarify... – CSharp Jan 03 '15 at 13:50

0 Answers0