Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
C++11 support for Android NDK in Qt Creator
daljit97 last edited by daljit97
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
Application.mkfile 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
CONFIG += c++11 QMAKE_CXXFLAGS += -std=c++11
VRonin last edited by
I have already added this to my .pro file
That project is CMake based. How are you building the library?
daljit97 last edited by
Well since it is a header only library, I just downloaded the header and included it in my project like this:
Running it on Desktop (Linux) works fine