[android-developers] Re: Developing a C++ static library for use with Java on the Android

2010-05-01 Thread mah
You cannot link a static native library into a Java application; your only option is a shared object (.so). Fortunately though, shared objects can have static libraries linked into them; you'll just need to provide exports to give access to the items you want Java to access. On Apr 30, 3:10 am,

[android-developers] Re: Developing a C++ static library for use with Java on the Android

2010-04-30 Thread FrankG
Hello Ravi, Thanks for the example .. but it is an example for a dynamic linked lib ( *.so ) not for using any existing code as a static lib ( *.a ). Nevertheless thanks for your efforts and to everybody who provides examples,details and comments. Frank On 29 Apr., 19:32, ravindra singhai

[android-developers] Re: Developing a C++ static library for use with Java on the Android

2010-04-29 Thread FrankG
Hello Kelly, I would not say this can be so easy at the end. Josh says he want to use a static library, but with JNI he need to use a dynamic one or at least a dynamic lib which wraps the static one. And even with this wrapper he can run into linker problems not finding all symbols. It can be a

[android-developers] Re: Developing a C++ static library for use with Java on the Android

2010-04-29 Thread Kelly
The two-libs example uses a shared library that wraps the static one, exactly as desired. I'm currently doing the same thing in my project :-) On Apr 28, 11:51 pm, FrankG frankgru...@googlemail.com wrote: Hello Kelly, I would not say this can be so easy at the end. Josh says he want to use a

Re: [android-developers] Re: Developing a C++ static library for use with Java on the Android

2010-04-29 Thread ravindra singhai
Hi Josh, I've attached a sample application at http://www.naresh.se/phpBB/viewtopic.php?f=10t=19p=33#p33 Attached is a very basic sample application ( SimpleJNI.zip) which will guide you to use C/C++ static library ( .so ) file from android java file. Steps are also mentioned to create C/C++

[android-developers] Re: Developing a C++ static library for use with Java on the Android

2010-04-28 Thread Kelly
Download the android NDK and see how they use libraries. Just reverse engineer their very simple JNI projects and you can build yours no problem. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to