How to solve the compile error in Android NDK? -
the directory structure following:
- test/ -- deps/ --- librtmp/ ---- rtmp.h ---- android.mk -> librtmp.a --- .../ #other deps -- android.mk -> test.a -- src/ --- flv_muxer.c
the flv_muxer.c code snippet:
#include "librtmp/rtmp.h"
the compile error:
$ ndk-build [armeabi-v7a] compile thumb : test <= flv_muxer.c in file included /users/workdir/testproject/test/src/flv_muxer.c:9:0: /users/workdir/testproject/test/src/flv_muxer.h:13:26: fatal error: librtmp/rtmp.h: no such file or directory #include "librtmp/rtmp.h" ^ compilation terminated. make: *** error 1
i solved compile error adding local_cflags
or local_c_includes
following:
-- android.mk -> test.a
local_cflags := -i$(local_path)/deps/
or
local_c_includes := \ $(local_path)/deps/ \ $(local_path)/deps/librtmp
Comments
Post a Comment