Issue
I'm compiling the library for android (especially android M) and ı want to ask while I'm using dlopen();
function, what is the correct syntax of library path?
Which one is correct?
First one:
libcameraHandle = ::dlopen("/system/lib/libseccameraadaptor.so", RTLD_LAZY);
so the path is: /system/lib/libseccameraadaptor.so
or Second one:
libcameraHandle = ::dlopen("libseccameraadaptor.so", RTLD_LAZY);
so the path is libseccameraadaptor.so
I also found something that can be good info for this specific subject but couldn't understand well look into cool hacks/opengl section
Solution
The second syntax searches for libseccameraadaptor.so
in standard paths and paths specified in LD_LIBRARY_PATH
. For a standard library like this which will be in /system/lib
forever it does not really make much difference. For anything else, the second call is probly more robust if library is ever moved to different place.
Answered By - yugr
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.