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. QtCreator compile returning stdlib.h: No such file or directory

QtCreator compile returning stdlib.h: No such file or directory

Scheduled Pinned Locked Moved Solved Mobile and Embedded
qtcreatorqt 5.7qt 5.7 and rpi3
7 Posts 3 Posters 10.2k 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.
  • G Offline
    G Offline
    GregWilsonLindberg
    wrote on last edited by
    #1

    I've just started getting this error after updating to QtCreator 4.2.0, Qt 5.7.1 on a Raspberry Pi3 running the latest Rasbian and the QtCreator from the repositories. I am not building an Android app, just a desktop app for the Raspberry Pi3.

    I try to build now and I get an error from cstdlib caused by:
    #include_next <stdlib.h>

    From my research, the problem is caused by using -isystem /usr/include, but I don't know how to tell QtCreator that I don't need that.

    Anyone know what can be done to correct this?

    jsulmJ 1 Reply Last reply
    0
    • G GregWilsonLindberg

      I've just started getting this error after updating to QtCreator 4.2.0, Qt 5.7.1 on a Raspberry Pi3 running the latest Rasbian and the QtCreator from the repositories. I am not building an Android app, just a desktop app for the Raspberry Pi3.

      I try to build now and I get an error from cstdlib caused by:
      #include_next <stdlib.h>

      From my research, the problem is caused by using -isystem /usr/include, but I don't know how to tell QtCreator that I don't need that.

      Anyone know what can be done to correct this?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @GregWilsonLindberg After upgrading did you try to delete build directory, run qmake and build again?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      G 1 Reply Last reply
      0
      • G Offline
        G Offline
        GregWilsonLindberg
        wrote on last edited by
        #3

        @jsulm I had deleted the directory when I copied the project to the new uSD card. I tried deleting the build directory again and I got the same results as before.

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @GregWilsonLindberg After upgrading did you try to delete build directory, run qmake and build again?

          G Offline
          G Offline
          GregWilsonLindberg
          wrote on last edited by
          #4

          @jsulm I hadn't forced qmake to run, but I deleted the build directory and then ran qmake and then did the build and I am getting the same error.
          The compiler is still showing the offending '-isystem /usr/include' option. It seems that this is what I need to get rid of.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mvuori
            wrote on last edited by
            #5

            I'd try deleting the <project>.pro.user file; it seems to be often conflicting when updating QtCreator, but deleting it and thus reconfiguring the project fixes things.

            G 1 Reply Last reply
            1
            • M mvuori

              I'd try deleting the <project>.pro.user file; it seems to be often conflicting when updating QtCreator, but deleting it and thus reconfiguring the project fixes things.

              G Offline
              G Offline
              GregWilsonLindberg
              wrote on last edited by
              #6

              @mvuori even deleting the .pro.user file & the build directory, opening the project and rerunning qmake does not get rid of the error.

              G 1 Reply Last reply
              0
              • G GregWilsonLindberg

                @mvuori even deleting the .pro.user file & the build directory, opening the project and rerunning qmake does not get rid of the error.

                G Offline
                G Offline
                GregWilsonLindberg
                wrote on last edited by
                #7

                @GregWilsonLindberg
                I think that the g++ version is what is doing it. The old version of rasbian
                is using g++ v4.9.2. The new version of rasbian is using g++ v6.3.0-18+.
                For the old compiler we had had to add an "INCLUDEPATH =
                /usr/include" line into the .pro file to get everything picked up
                properly. For the new compiler (and the change from #include to #include_next
                in cstdlib) that messes up.
                I'm removing the INCLUDEPATH, (which seems to have been included as -isystem
                instead of -I) and that is fixing the problem.

                1 Reply Last reply
                1

                • Login

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