Issue
The directory structure as 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 from /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
Solution
I solved the compile error by adding LOCAL_CFLAGS or LOCAL_C_INCLUDES as following:
-- Android.mk -> test.a
LOCAL_CFLAGS := -I$(LOCAL_PATH)/deps/
or
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/deps/ \
$(LOCAL_PATH)/deps/librtmp
Answered By - Jerikc XIONG
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.