Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] Qt 5.4 Android Windows - stdlib.h: No such file
QtWS25 Last Chance

[SOLVED] Qt 5.4 Android Windows - stdlib.h: No such file

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 4 Posters 8.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    metaDom
    wrote on 8 Sept 2014, 12:26 last edited by
    #1

    Problem occurs due compilation of Qt 5.4 Alpha for Android target on Windows 8.1 dev machine

    @configure.bat -developer-build -platform win32-g++ -opengl es2 -xplatform android-g++ -android-ndk C:\Android\android-ndk-r10 -android-sdk C:\Android\adt-bundle-windows-x86_64-20140702\sdk -android-toolchain-version 4.8 -opensource -confirm-license -nomake tests -nomake examples@

    @mingw32-make.exe@

    @C:/Android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.8/include/cstdlib:72:
    20: fatal error: stdlib.h: No such file or directory
    #include <stdlib.h>
    ^
    compilation terminated.@

    Used for configuration:

    NDK Version: R10
    SDK Version: adt-bundle-windows-x86_64-20140702

    ANDROID_NDK_PLATFORM=android-9
    ANDROID_TARGET_ARCH=armeabi-v7a
    ANDROID_BUILD_TOOLS_REVISION=17.0.0
    ANDROID_NDK_HOST=windows-x86_64

    Any ideas are welcome :)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      metaDom
      wrote on 8 Sept 2014, 15:14 last edited by
      #2

      using the 32bit version of the android sdk solved the problem

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vtfw
        wrote on 8 Sept 2014, 20:19 last edited by
        #3

        I can confirm this on Windows 7. Thanks for the post, it saved me time. Although I can't figure out why...

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dlfo
          wrote on 18 Sept 2014, 16:08 last edited by
          #4

          I have the same problem here, in Ubuntu 14.04 64 bit:

          @./configure -xplatform android-g++ -nomake tests -nomake examples -android-ndk $ANDROID_NDK_ROOT -android-sdk $ANDROID_SDK_ROOT -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk-platform 10 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -no-warnings-are-errors -opensource -confirm-license -v@

          NDK version: r10b
          SDK Version: adt-bundle-linux-x86_64-20140702

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dheerendra
            Qt Champions 2022
            wrote on 18 Sept 2014, 16:33 last edited by
            #5

            Did u try with 32 bit ndk ? Gene really we tend to use 64 bit? This creates issue while building. From command line it looks you are using 64 bit ndk.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dlfo
              wrote on 18 Sept 2014, 16:44 last edited by
              #6

              Do you mean android-ndk32-r10b-linux-x86_64.tar.bz2?
              I don't get the difference. Does android-ndk64-r10b-linux-x86_64.tar.bz2 (in which I've used) supposed to build for 64 bit arm target?
              Is it a bug or misconfiguration or maybe both?

              P.S: exact same configure command did not work with ndk32. I get:
              Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify

              For toolchain version 4.8, it finds stdio.h, but it can't find other headers like math.h.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dheerendra
                Qt Champions 2022
                wrote on 18 Sept 2014, 17:02 last edited by
                #7

                Yes and Yes. It is not bug or misconfiguration. Since we are using 32 bit, we should use it. Emulator is also 32 bit. So we need to use 32 bit.

                Dheerendra
                @Community Service
                Certified Qt Specialist
                http://www.pthinks.com

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dlfo
                  wrote on 18 Sept 2014, 17:25 last edited by
                  #8

                  I still can not fix this, even when I tested both of ndk32 and ndk64. I use this howto:

                  http://qt-project.org/wiki/Qt5ForAndroidBuilding

                  I get this error using ndk64 (ndk32 gives the same result)

                  @ANDROID_NDK_PLATFORM=android-10rb ../../configure -xplatform android-g++ -nomake tests -nomake examples -android-ndk $ANDROID_NDK_ROOT -android-sdk $ANDROID_SDK_ROOT -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk-platform 10 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -no-warnings-are-errors -opensource -confirm-license@

                  @fatal error: stdio.h: No such file or directory
                  #include <stdio.h>
                  ^
                  compilation terminated.
                  make: *** [arch.o] Error 1
                  Unable to determine architecture!
                  Turn on verbose messaging (-v) to see the final report.
                  Determining architecture... ()@

                  and further:

                  @g++ -o arch arch.o
                  Found architecture in binary
                  CFG_HOST_ARCH="x86_64"
                  CFG_HOST_CPUFEATURES=" mmx sse sse2"
                  System architecture: 'unknown'
                  Host architecture: 'x86_64'@

                  when I use verbose mode.

                  I think the problem comes from the "unkown architecture" above.

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dlfo
                    wrote on 23 Sept 2014, 14:37 last edited by
                    #9

                    Now I am using 32 bit adt (adt-bundle-linux-x86-20140702) and NDK 32 (android-ndk32-r10b-linux-x86_64), but the configure script still can not find math.h and several libraries like:
                    @/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find@
                    and this happens for several other libraries like:
                    -llog -lz -ldl -lstdc++ -lm -lc

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved