在NDK支持的std ::功能? [英] Is std::function supported in the NDK?
问题描述
我使用NDK版本R9B,我想我说我需要在我application.mk文件c ++ 11的支持一切。我不明白,从日食任何投诉,当我有工作,但是当我尝试使用std ::函数它指出:
I'm using NDK version r9b, and I think I added everything I needed for c++11 support in my application.mk file. I don't get any complaints from eclipse when I include functional but when I try to use std::function it states:
符号功能无法解析
这是我的android.mk文件:
This is my android.mk file:
LOCAL_PATH := $(call my-dir)
CPP_CORE := $(abspath $(call my-dir)/../../common)
include $(CLEAR_VARS)
LOCAL_MODULE := game
LOCAL_CFLAGS := -Wall -Wextra
LOCAL_SRC_FILES := ApplicationEngine.cpp
LOCAL_SRC_FILES += jni.cpp
LOCAL_SRC_FILES += ../../common/Log.cpp
LOCAL_SRC_FILES += ../../common/MessageQueue.cpp
LOCAL_C_INCLUDES := glwrapper.h
LOCAL_C_INCLUDES += $(CPP_CORE)
LOCAL_LDLIBS := -lGLESv2
LOCAL_CFLAGS := -D__GXX_EXPERIMENTAL_CXX0X__
LOCAL_CFLAGS += -std=gnu++11
include $(BUILD_SHARED_LIBRARY)
和我application.mk文件:
and my application.mk file:
APP_PLATFORM := android-10
APP_ABI := armeabi-v7a
APP_STL:= gnustl_static
NDK_TOOLCHAIN_VERSION := 4.8
APP_CPPFLAGS := -fexceptions -std=c++11 -stdlib=libc++
如果有人知道的std ::功能是否支持或不或看到我做错事了MK文件,我会AP preciate的帮助。
If anyone knows whether std::function is supported or not or sees me doing something wrong in a mk file I would appreciate the help.
推荐答案
我APP_CPPFLAGS发现,-stdlib = libc中++是无效的。一旦我删除,我是能够编译和使用std ::函数没有任何问题。
I found out that "-stdlib=libc++" in APP_CPPFLAGS is invalid. Once I removed that I was able to compile and use std::function without any problems.
这篇关于在NDK支持的std ::功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!