I have specified the full library path , below is my sample
application code snippet accessing the library with dlopen -
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
typedef void (*simple_demo_function)(void);
int main(int argc, char **argv) {
void *handle;
char *error;
simple_demo_function demo_function;
handle = dlopen ("/u/equ_library_build/mp4040equ/tst/
mp4040equ_ARM_lib_test/libequ.so", RTLD_LAZY);
if (!handle) {
fputs (dlerror(), stderr);
exit(1);
}
printf("KKKKKK Calling dlsym\n");
demo_function = dlsym(handle, "MP4040EQU_Process");
if ((error = dlerror())) {
fprintf(stderr, "Couldn't find MP4040EQU_Process: %s\n", error);
exit(1);
}
/* Now call the function in the DL library */
(*demo_function)();
printf (">>>>> end of test >>>>>>");
dlclose(handle);
return 0;
}
Regards,
Krupa
On Mar 4, 8:51 am, Angus Lees <
gusl...@gmail.com> wrote:
> dlopen works on android, as normal (almost):
> - You need to specify the full library path, since LD_LIBRARY_PATH doesn't
> include your app directory (and that search path can't be changed once your
> process has started).
> - Some of the usual Linux RTLD_* flags aren't supported.
>
> I suggest you start by looking at any errors mentioned in logcat leading up
> to your failed dlopen() call.
>
> - Gus
>