1 #include "foo.h" 2 #include <android/log.h> 3 4 /* FOO should be defined to '2' when building foo.c */ 5 #ifndef FOO 6 #error FOO is not defined here ! 7 #endif 8 9 #if FOO != 2 10 #error FOO is incorrectly defined here ! 11 #endif 12 13 #define LOG_TAG "libfoo" 14 #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) 15 foo(int x)16int foo(int x) 17 { 18 LOGI("foo(%d) called !", x); 19 return x+1; 20 } 21