天天看点

win10 ndk 编译hello

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := test

LOCAL_SRC_FILES := test.cpp

LOCAL_CFLAGS += -pie -fPIE

LOCAL_LDFLAGS += -pie -fPIE

include $(BUILD_EXECUTABLE)

APP_STL := gnustl_static

APP_CPPFLAGS := -frtti -fexceptions

APP_ABI :=armeabi

APP_PLATFORM := android-22

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc,char *argv[])
{
    fprintf(stderr, "this is a test...\n");
    return 0;
}
           

继续阅读