我无法在Windows中构建我的代码。但它适用于linux
andoird.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
TARGET_PLATFORM := android-8
LOCAL_ARM_MODE := arm
LOCAL_MODULE := hello
LOCAL_SRC_FILES := hello.c
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib –llog
include $(BUILD_SHARED_LIBRARY)
#$(call import-module)
的hello.c
#include <unistd.h>
#include <stdlib.h>
#include <android/log.h>
#define LOG_TAG "testhello"
#define LOGD(fmt, args...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, fmt, ##args)
int hook_entry(char * a){
LOGD("Hello ARM! %s pid:%d\n",a,getpid());
return 0;
}
D:/android-ndk-r8d/build/core/build-binary.mk:357:警告:覆盖目标E:/yanshi/libhello//obj/local/armeabi'
D:/android-ndk-r8d/build/core/build-binary.mk:357: warning: ignoring old commands for target
的命令E:/ yanshi / libhello // obj / local / armeabi'< / p>
“编译arm:hello&lt; = hello.c
SharedLibrary:libhello.so
arm-linux-androideabi-g ++:错误:-llog:没有这样的文件或目录
make: * [E:/yanshi/libhello//obj/local/armeabi/libhello.so]错误1
Windows 7中的llog有什么问题?