How to allow android logging in a shared library? -
i compiling 3rd party c library android app shared library. add android logging source code of c library can see methods gets called, arguments. can not make work. tried following:
add -llog android.mk c library
local_cflags := := ... -llog
add header file source file abc.c want log
#include < android/log.h>
add line
__android_log_print(android_log_debug, "myapp", "this method x");
error: __android_log_print not recognized.
what should make work?
__android_log_print
takes variadic, printf
-like arguments after 3rd one. use
__android_log_write(android_log_debug, "myapp", "this method x");
instead, no-extra-arguments logging.
edit: -llog linker flag, not compiler one. remove
local_cflags := := ... -llog
and instead write
local_ldlibs := -llog
Comments
Post a Comment