我正在使用OpenCV在C上创建一个库,并尝试为Android编译它.
我不能使用to_string(int)但我不能.我试图修改我的makefile太多次了.我的最后一个配置就是:
AndroID.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_CAMERA_MODulES:=off
OPENCV_INSTALL_MODulES:=on
include $(LOCAL_PATH)/Jsoncpp/AndroID.mk
include /Users/rafaelruizmunoz/Desktop/AndroIDDevelopment/OpenCV-2.4.9-androID-
sdk/sdk/native/jnI/OpenCV.mkOPENCV_liB_TYPE:=SHARED
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_C_INCLUDES += /Users/rafaelruizmunoz/opencvscan/OpenCVtry/
LOCAL_C_INCLUDES += /Users/rafaelruizmunoz/Desktop/RD/OpenCVtry/librarIEs/Jsoncpp-
master/includeLOCAL_PATH := jni
LOCAL_ALLOW_UNdefineD_SYMBolS := true
LOCAL_MODulE := libXYZ
LOCAL_MODulE_name := mylibXYZ
LOCAL_SRC_fileS := androIDClass.cpp main.cpp utils.cpp
LOCAL_LDliBS += -llog -ldl
LOCAL_CPPFLAGS := -std=c++11 CFLAGS=-g -Wall -Wextra -std=c++11 -Wno-write-strings
../../include/boostLOCAL_SHARED_liBRARIES := libJsoncpp libopencv_java
include $(BUILD_SHARED_liBRARY)
这是我的Application.mk
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions
APP_ABI := all
APP_MODulES := libXYZ libJsoncpp
APP_CPPFLAGS := -std=gnu++0x
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -DDEBUG
APP_CPPFLAGS += -std=c++11
NDK_TOolCHAIN_VERSION := 4.8
LOCAL_C_INCLUDES += ${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.8/include
APP_USE_CPP0X := true
提前致谢.
解决方法 AndroID NDK 9附带 llvm-libc++,完全支持cpp11功能.要启用它,您只需在Application.mk中修改这些:APP_CPPFLAGS := -std=c++11
和
APP_STL:=c++_static
要么
APP_STL:=c++_shared总结
以上是内存溢出为你收集整理的android – 错误:’to_string’不是’std’的成员全部内容,希望文章能够帮你解决android – 错误:’to_string’不是’std’的成员所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)