C++11 support for Android NDK in Qt Creator
-
I have tried to integrate the https://github.com/nlohmann/json library in my Qt project for Android. When I compile I get many errors:
error: 'to_string' is not a member of 'std' error: 'strtof' is not a member of 'std'
and others. It seems that some C++11 features are missing in the build. I know that in Android Studio projects you can add
APP_STL:=c++_static
to theApplication.mk
file and that should solve the issue. But how can I add C++11 support for Android NDK in a project in Qt Creator? I have already added this to my.pro
file:CONFIG += c++11 QMAKE_CXXFLAGS += -std=c++11
-
I have tried to integrate the https://github.com/nlohmann/json library in my Qt project for Android. When I compile I get many errors:
error: 'to_string' is not a member of 'std' error: 'strtof' is not a member of 'std'
and others. It seems that some C++11 features are missing in the build. I know that in Android Studio projects you can add
APP_STL:=c++_static
to theApplication.mk
file and that should solve the issue. But how can I add C++11 support for Android NDK in a project in Qt Creator? I have already added this to my.pro
file:CONFIG += c++11 QMAKE_CXXFLAGS += -std=c++11