1

我无法在 windows 中对我的代码进行 ndk-build。但它在linux中工作

安卓.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)

你好ç

#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 targetE:/yanshi/libhello//obj/local/armeabi' 的命令

"编译 arm : hello <= hello.c

共享库:libhello.so

arm-linux-androideabi-g++:错误:-llog:没有这样的文件或目录

make: * [E:/yanshi/libhello//obj/local/armeabi/libhello.so] 错误1

Windows 7中的llog有什么问题?

4

0 回答 0