On Oct 21, 1:29 am, David Turner <
di...@android.com> wrote:
> That is normal, by default, i.e. if you don't specify an APP_MODULES, only
> the top-level module declared in your Android.mk and their dependencies will
> be copied to the libs/ directory.
> If your Android.mk is empty, nothing will be copied. As soon as you declare
> a shared library or an executable, it will automatically depend on
> stlport_shared, and thus the latter will be copied to libs/ as well.
It seems like that automatic dependency on stlport_shared isn't
happening.
If I start with the hello-jni sample and do only the following:
1. Create a dummy.cpp file and add it to LOCAL_SRC_FILES in
Android.mk
2. Create Application.mk with only APP_STL := stlport_shared
When I run ndk-build, I get the following output. The Install step
for libstlport_shared.so doesn't happen.
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/
gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : hello-jni <= hello-jni.c
Compile++ thumb : hello-jni <= dummy.cpp
StaticLibrary : libstdc++.a
Prebuilt : libstlport_shared.so <= <NDK>/sources/cxx-stl/
stlport/libs/armeabi/
SharedLibrary : libhello-jni.so
Install : libhello-jni.so => libs/armeabi/libhello-jni.so
I see the following files in the obj directory:
./local/armeabi/libhello-jni.so
./local/armeabi/libstdc++.a
./local/armeabi/libstlport_shared.so
./local/armeabi/objs-debug/hello-jni
./local/armeabi/objs-debug/hello-jni/dummy.o
./local/armeabi/objs-debug/hello-jni/dummy.o.d
./local/armeabi/objs-debug/hello-jni/hello-jni.o
./local/armeabi/objs-debug/hello-jni/hello-jni.o.d
And this in the libs directory:
./armeabi/gdb.setup
./armeabi/gdbserver
./armeabi/libhello-jni.so
There is no libstlport_shared.so in the libs directory.
I know there's an additional step of adding the loadLibrary to the
Java code, just using this as a simple example.
Am I missing something?
Thanks much!