我尝试为Android构建nanomsg
~/work/android-ndk-r10e/ndk-build
我有错误:
In file included from /home/roman/work/Nano/app/jni/src/utils/efd.c:28:0:
/home/roman/work/Nano/app/jni/src/utils/efd_eventfd.inc:27:25: fatal error: sys/eventfd.h: No such file or directory
#include <sys/eventfd.h>
^
compilation terminated.
make: *** [/home/roman/work/Nano/app/obj/local/armeabi/objs/nano/src/utils/efd.o] Error 1
但是我看到bionic包含这个文件(参见here)。
我无法理解错误! 我使用Android.mk:https://gist.github.com/kristianlm/27d12ca7e4b2ef8e89fc
有人可以帮我吗? 谢谢!
答案 0 :(得分:1)
我添加了Application.mk,它可以工作:
APP_STL := gnustl_static
APP_CPPFLAGS:= -std=c++11 -frtti -fexceptions
NDK_TOOLCHAIN_VERSION=4.8
APP_PLATFORM := android-10
APP_ABI := armeabi