Where is .so file generated for hello-jni ?

205 views
Skip to first unread message

swapnil kamble

unread,
Aug 27, 2009, 1:49:24 AM8/27/09
to andro...@googlegroups.com
Hi,
    I am trying to build ndk samples by following command. It gives me compilation successful, but I could not find libhello-jni.so file even if libs directory. And even if add new directory as per given in this tutorial

http://earlence.blogspot.com/2009/07/writing-applications-using-android-ndk.html

$make APP does not find this app, says use hello-jni or two-libs.

bash-3.2$ make APP=hello-jni -B
Android NDK: Building for application 'hello-jni'
Compile thumb  : hello-jni <= sources/samples/hello-jni/hello-jni.c
SharedLibrary  : libhello-jni.so
Install        : libhello-jni.so => apps/hello-jni/project/libs/armeabi
bash-3.2$

Thanks in advance..
--
...Swapnil

|| Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
|| Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||
sources.rar
apps.rar

Rajat Dixit

unread,
Aug 27, 2009, 12:17:06 PM8/27/09
to andro...@googlegroups.com
To compile 'hello-jni', while you are in the root folder of you NDK (say 'NdkRoot'), type- "make APP=hello-jni". It works fine.
('hello-jni' is a variable name corresponding to the folder name in "NdkRoot/apps")
Your generated .so file "libhello-jni.so" is found in-
NdkRoot/apps/hello-jni/project/libs/armeabi/

P.S. You can open the 'project' folder in eclipse

good luck
- Rajat, New York

Shuhrat Dehkanov

unread,
Aug 27, 2009, 9:46:46 PM8/27/09
to android-ndk
Hello

> Install : libhello-jni.so => apps/hello-jni/project/libs/armeabi

As the compiler says, the libhello-jni.so is copied to [NDK_ROOT/]apps/
hello-jni/project/libs/armeabi

Moreover, the folder names for your project in NDK_ROOT/source and
NDK_ROOT/apps need to be identical (not "native" and "NativeApp" as in
your case). Also, folder names are case sensitive.




On Aug 27, 2:49 pm, swapnil kamble <swap.kam...@gmail.com> wrote:
> Hi,
>     I am trying to build ndk samples by following command. It gives me
> compilation successful, but I could not find libhello-jni.so file even if
> libs directory. And even if add new directory as per given in this tutorial
>
> http://earlence.blogspot.com/2009/07/writing-applications-using-andro...
>
> $make APP does not find this app, says use hello-jni or two-libs.
>
> bash-3.2$ make APP=hello-jni -B
> Android NDK: Building for application 'hello-jni'
> Compile thumb  : hello-jni <= sources/samples/hello-jni/hello-jni.c
> SharedLibrary  : libhello-jni.so
> Install        : libhello-jni.so => apps/hello-jni/project/libs/armeabi
> bash-3.2$
>
> Thanks in advance..
> --
> ...Swapnil
>
> || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
> || Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||
>
>  sources.rar
> 4KViewDownload
>
>  apps.rar
> 43KViewDownload

swapnil kamble

unread,
Aug 28, 2009, 2:40:51 AM8/28/09
to andro...@googlegroups.com
Thanks Rajat and Shuhrat for your replies. I got it working.

One more basic question that if I have shared lib using other shared lib, then do I need to re-compile that other shared lib too ?

Thanks again.

Rajat Dixit

unread,
Aug 28, 2009, 3:28:10 AM8/28/09
to andro...@googlegroups.com
A shared library is a library which can be used by more than one program. Most shared library systems are restricted in that they only allow a single level of dependencies. If a shared library would try to compile making use of another one, it might create some problems. Although, you can check 'Libtool', which is used for inter-library dependencies, but shared library depending on another one is mostly not recommended.

Rajat, New York
Reply all
Reply to author
Forward
0 new messages