I am developing a cross-platform library, and am trying to test on Android. I have compiled my library with ndk-build, and am trying to compile and run a command-line test fixture we have for the library.
I use adb push
to put the test fixture and .so in /data/local/tmp
and chmod
both to 777.
Then I use adb shell
to run the test, but get the following error
shell@android:/data/local/tmp $ ./mytest
./mytest
link_image[1936]: 7289 could not load needed library 'libtconfig.so' for './mytest' (load_library[1091]: Library 'libtconfig.so' not found)CANNOT LINK EXECUTABLE
Both mytest
executable and libtconfig.so
are in the same directory. I would have assumed it looks in "." directory first?