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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -