Printing in LOG from native functions

557 views
Skip to first unread message

Riasat Abir

unread,
Apr 13, 2011, 7:00:54 AM4/13/11
to android-ndk
I tried to print in Android log from native code as suggested here: http://stackoverflow.com/questions/5459324/how-to-see-printf-lines-in-gdb

#include <android/log.h>

__android_log_print(ANDROID_LOG_INFO, "MYPROG", "Hellowrold");

But I am getting undefined reference to `__android_log_print'

Regards,
Riasat

Riasat Abir

unread,
Apr 13, 2011, 7:11:27 AM4/13/11
to android-ndk
It worked, I've to add LOCAL_LDLIBS := -llog in Android.mk

Thanks,
Riasat
--

HimHim

Reply all
Reply to author
Forward
0 new messages