mardi 27 juin 2017

'invalid use of 'auto'' in building static library with Android NDK r10e

I'm building some C++ project for android to use it on unity plugin. I succeed to compile for iOS, but I get the following error for android:

~/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:3789:14: error: invalid use of 'auto'

~/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/future:114:11: error: declaration of 'class std::future<void>'
 class future;

I'm using android-ndk-r10e and this CMakeLists.txt code:

cmake_minimum_required(VERSION 2.8)
project(PluginAndroid)

# Android configuration
set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 19) # API level
set(CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
set(CMAKE ANDROID_STL_TYPE stlport_static)
set(CMAKE_ANDROID_TOOLCHAIN_NAME arm-linux-androideabi-4.8)
set(CMAKE_CXX_STANDARD 11)


include_directories ("${PROJECT_SOURCE_DIR}/3rdParty/common/")
....

file(GLOB source_files
    "*.h"
    "*.cpp"
)

add_library(PluginAndroid STATIC ${source_files})

Any clue to fix this issue?

Aucun commentaire:

Enregistrer un commentaire