Important: Please read the Qt Code of Conduct -

Bits/c++config.h missing

  • Hello,

    I'm totally new in QT Android development. I'm trying to run the sample application.

    When I want to build it, i get this error message.

    11:47:39: Running steps for project accelbubble...
    11:47:39: Configuration unchanged, skipping qmake step.
    11:47:39: Starting: "D:\qtinstall\Tools\mingw48_32\bin\mingw32-make.exe"
    D:\android\android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -pipe -std=gnu++0x -g -g -gdwarf-2 -marm -O0 -fno-omit-frame-pointer -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DQT_SENSORS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I....\5.2.1\android_armv7\mkspecs\android-g++ -I..\accelbubble -I....\5.2.1\android_armv7\include -I....\5.2.1\android_armv7\include\QtQuick -I....\5.2.1\android_armv7\include\QtSvg -I....\5.2.1\android_armv7\include\QtQml -I....\5.2.1\android_armv7\include\QtWidgets -I....\5.2.1\android_armv7\include\QtXml -I....\5.2.1\android_armv7\include\QtSensors -I....\5.2.1\android_armv7\include\QtNetwork -I....\5.2.1\android_armv7\include\QtGui -I....\5.2.1\android_armv7\include\QtCore -I. -I......\android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include -ID:\android\android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/libs/default/armeabi-v7a/include -I......\android\android-ndk-r9d\platforms\android-19\arch-arm\usr\include -I. -o main.obj ..\accelbubble\main.cpp
    In file included from ......\android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include/algorithm:60:0,
    from ....\5.2.1\android_armv7\include/QtCore/qglobal.h:82,
    from ....\5.2.1\android_armv7\include/QtCore/qcoreapplication.h:45,
    from ....\5.2.1\android_armv7\include/QtGui/qguiapplication.h:45,
    from ....\5.2.1\android_armv7\include/QtGui/QGuiApplication:1,
    from ..\accelbubble\main.cpp:1:
    ......\android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include/utility:68:28: fatal error: bits/c++config.h: No such file or directory
    #include <bits/c++config.h>
    compilation terminated.
    makefile:810: recipe for target 'main.obj' failed
    mingw32-make: *** [main.obj] Error 1
    11:47:43: The process "D:\qtinstall\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project accelbubble (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.2.1))
    When executing step 'Make'
    11:47:43: Elapsed time: 00:04.

    Could anybody help, me to find the solution? I have already search all over the internet for solution :)

    Thank you.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    IIRC, I saw recently that the ndk r9d made some changes that might break things. You should have a look at the "bug report system": , you might find something there.

    You can also ask on the interest mailing list (don't forget to subscribe first)

    Hope it helps

  • Hi,

    Thank you, for the aswer. I downgraded the ndk to r9c, but i'm still having tha same problem.

    I tried to find some useful information at the bug tracker system, but i found nothing.

    Do anybody have any idea to solve my problem?

    Thank you.


  • I had this problem after updating.
    Try previous version of NDK.

  • mpalfy,

    Have you had any success with running a Qt app on Android?

    I have same issue with r10. I rolled back to r8e and no improvement. I have tried Qt 5.2.1 and Qt 5.3.1.

    16:10:07: Running steps for project qt-5-3-1-hello...
    16:10:07: Configuration unchanged, skipping qmake step.
    16:10:07: Starting: "/usr/bin/make"
    /Users/esutton/Qt5.3.1/5.3/android_armv7/bin/uic mainwindow.ui -o ui_mainwindow.h
    /Users/esutton/android/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86/bin/arm-linux-androideabi-g++ -c -pipe -std=gnu++0x -g -g -gdwarf-2 -marm -O0 -fno-omit-frame-pointer -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../Qt5.3.1/5.3/android_armv7/mkspecs/android-g++ -I. -I../../../Qt5.3.1/5.3/android_armv7/include -I../../../Qt5.3.1/5.3/android_armv7/include/QtWidgets -I../../../Qt5.3.1/5.3/android_armv7/include/QtGui -I../../../Qt5.3.1/5.3/android_armv7/include/QtCore -I. -I. -I../../../android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.8/include -I/Users/esutton/android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.8/libs/default/armeabi-v7a/include -I../../../android/android-ndk-r10/platforms/android-19/arch-arm/usr/include -o main.o main.cpp
    In file included from ../../../Qt5.3.1/5.3/android_armv7/include/QtCore/qcompilerdetection.h:845:0,
    from ../../../Qt5.3.1/5.3/android_armv7/include/QtCore/qglobal.h:74,
    from ../../../Qt5.3.1/5.3/android_armv7/include/QtGui/qwindowdefs.h:45,
    from ../../../Qt5.3.1/5.3/android_armv7/include/QtWidgets/qwidget.h:45,
    from ../../../Qt5.3.1/5.3/android_armv7/include/QtWidgets/qmainwindow.h:45,
    from ../../../Qt5.3.1/5.3/android_armv7/include/QtWidgets/QMainWindow:1,
    from mainwindow.h:4,
    from main.cpp:1:
    ../../../android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.8/include/utility:68:28: fatal error: bits/c++config.h: No such file or directory
    #include <bits/c++config.h>
    compilation terminated.
    make: *** [main.o] Error 1

  • Adding the following include path and lib path to my Qt project file fixed the compile issue:

    INCLUDEPATH += /home/edward/android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include
    LIBS += -L/home/edward/android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi
    Or using the build environment variables:
    INCLUDEPATH += $$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$$(ANDROID_NDK_TOOLCHAIN_VERSION)/libs/armeabi-v7a/include
    LIBS += -L$$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$$(ANDROID_NDK_TOOLCHAIN_VERSION)/libs/armeabi

    However I am having incompatible ADV devices again:
    "ABI is incompatible, device supports ABIs: android-wear/armeabi-v7a"

    Adding this to build environment variable had fixed it in the past. It no longer seems to fix it for me?

    Add the following to your Qt Project->Build-Build Environment->Details


  • Success!! I have a Qt 5.3.1 "hello world" widget app finally running on an Android simulator.

    In summary, do not bother with developing under Ubuntu 64-bit. I expect it could be made to work but not worth the effort to me.

    Qt Android Development Environment:

    • Ubuntu Gnome 14.04 32-bit ( I failed using 64-bit Ubuntu )
    • Qt 5.3.1
    • JDK: /usr/lib/jvm/java-6-openjdk-i386 ( Do not use Java 7 )
    • SDK: /home/edward/android/adt-bundle-linux-x86-20140702/sdk
    • NDK: /home/edward/android/android-ndk-r10

    After installing all package updates I added one additional SDK.

    Eclipse->Android SDK Manager:

    Android simulators are a pain. The default settings often will not work. They are slow and cumbersome.

    Simulator Settings;

    • AVD: nexus7-api-20armeabi-v7a
      ** Target: Android 4.4W - API Level 20
      ** Android Wear ARM (aremabi-v7a)

      ** Skin: No Skin
      ** RAM: 1024 ( If I made any bigger the simulator would not run )
      ** VM Heap: 32
      ** Internal Storage: 200 MiB
      ** SD Card: Size: 1024 MiB
      ** Enmlation Options: (none)

    I thought I would try Qt 5.3.1 once again. This time when I installed, I did not try selecting Android x86 or Android armv5 as doing so seemed to break the Qt 5.3.1 installer under Ubuntu 64-bit. This may have been due to a missing 32-bit dependency under Ubuntu 64-bit. Anyway all I wanted was the default gcc and Android armv7 anyway


    I no longer needed to manually add the following build environment variable fro my Qt project:


    There is nothing Android specific in my Qt project file. I also removed the INCLUDEPATH and LIBS from my Qt project file:
    #INCLUDEPATH += $$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$$(ANDROID_NDK_TOOLCHAIN_VERSION)/libs/armeabi-v7a/include
    #LIBS += -L$$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$$(ANDROID_NDK_TOOLCHAIN_VERSION)/libs/armeabi

    I hope this may help some other Android newbie.


Log in to reply