Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := test
LOCAL_CFLAGS := -Wall
LOCAL_SRC_FILES := test.c
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv1_CM
include $(BUILD_SHARED_LIBRARY)
我跑......
ndk-build NDK_PROJECT_PATH=./ APP_BUILD_SCRIPT=./Android.mk
我得到......
编译thumb:test< = test.c
./ test.c:8:29:致命错误:GLES / gl.h:没有这样的文件或目录
编译终止。
make: * [obj / local / armeabi / objs / test / test.o]错误1
现在我猜测在Android.mk中添加-I / include或C_Include的cflag会起作用,但不应该由-lGLESv1_CM处理。
答案 0 :(得分:3)
让Application.mk文件为我工作....
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-8