我最近看了一篇帖子 C++ 11 threads with clang
表示在使用clang for C和C ++进行编译时存在差异。使用C ++我应该使用clang ++。我试图这样做,但我的程序没有编译。
这是我的Application.mk
APP_STL := c++_shared
APP_OPTIM := debug
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -fexceptions
APP_PLATFORM := android-23
APP_ABI := arm64-v8a armeabi armeabi-v7a mips mips64 x86 x86_64
NDK_TOOLCHAIN_VERSION := clang++
这是我的Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := main
SDL_PATH := ../SDL
LOCAL_CPPFLAGS += -fexceptions -std=c++14 -Werror -Wall -DGLEW_NO_GLU -D_ANDROID_ -DGL_GLEXT_PROTOTYPES
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include \
$(LOCAL_PATH)/../../../../../common/include
LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \
Source.cpp Another.cpp AndAnother.cpp DontForgetAboutMe.cpp
LOCAL_SHARED_LIBRARIES := SDL2 SDL2_mixer
LOCAL_STATIC_LIBRARIES := freetype2-static -lc++
LOCAL_LDLIBS:= -lGLESv1_CM -lGLESv2 -lGLESv3 -llog
include $(BUILD_SHARED_LIBRARY)
如何为C ++编译clang?