Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. fatal error: QColor: No such file or directory

fatal error: QColor: No such file or directory

Scheduled Pinned Locked Moved Solved General and Desktop
33 Posts 6 Posters 4.5k 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.
  • jsulmJ jsulm

    @SPlatten Please do a complete rebuild after changing pro file (delete build folder, run qmake, build).
    And please, if you want to tell the Qt version you're using do not post what "About QtCreator" dialog is showing - it only tells other qhat Qt version was used to build QtCreator...

    SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by SPlatten
    #4

    @jsulm , I've done:

    make clean
    make depend
    make
    

    Still getting the same error. I don't know where the build folder is, any suggestion on how to locate it?

    [Edit] found the build folder it was hidden.

    jsulmJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      @jsulm , I've done:

      make clean
      make depend
      make
      

      Still getting the same error. I don't know where the build folder is, any suggestion on how to locate it?

      [Edit] found the build folder it was hidden.

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

      @SPlatten You forgot qmake.
      And as I wrote: delete build folder or its content including hidden files, run qmake then make...

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

      SPlattenS 1 Reply Last reply
      0
      • jsulmJ jsulm

        @SPlatten You forgot qmake.
        And as I wrote: delete build folder or its content including hidden files, run qmake then make...

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by
        #6

        @jsulm , qmake results in:

        -bash: qmake: command not found
        

        I can run qmake-qt5.

        jsulmJ SPlattenS 2 Replies Last reply
        0
        • SPlattenS SPlatten

          @jsulm , qmake results in:

          -bash: qmake: command not found
          

          I can run qmake-qt5.

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

          @SPlatten said in fatal error: QColor: No such file or directory:

          I can run qmake-qt5

          Then do so, or use absolute path to qmake you want to use...

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

          SPlattenS 1 Reply Last reply
          0
          • jsulmJ jsulm

            @SPlatten said in fatal error: QColor: No such file or directory:

            I can run qmake-qt5

            Then do so, or use absolute path to qmake you want to use...

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #8
            This post is deleted!
            1 Reply Last reply
            0
            • SPlattenS SPlatten

              @jsulm , qmake results in:

              -bash: qmake: command not found
              

              I can run qmake-qt5.

              SPlattenS Offline
              SPlattenS Offline
              SPlatten
              wrote on last edited by
              #9
              This post is deleted!
              JonBJ 1 Reply Last reply
              0
              • SPlattenS SPlatten

                This post is deleted!

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by JonB
                #10

                @SPlatten

                I have added a header to the project that starts off with:

                ./../include/ASVscm/services/vehicle/dataMgmt.H:13:10: fatal error: QColor: No such file or directory

                And is that the file into which you have added your #include <QColor>? Since you do not say we do not know....

                Start by putting a #include <QColor> directly into one of your local .cpp or .h files in the current folder and trying to compile (without that bad .h file). Does that work or error? Then we know whether it is somehow to do with the dataMgmt.H file or not....

                SPlattenS 1 Reply Last reply
                0
                • JonBJ JonB

                  @SPlatten

                  I have added a header to the project that starts off with:

                  ./../include/ASVscm/services/vehicle/dataMgmt.H:13:10: fatal error: QColor: No such file or directory

                  And is that the file into which you have added your #include <QColor>? Since you do not say we do not know....

                  Start by putting a #include <QColor> directly into one of your local .cpp or .h files in the current folder and trying to compile (without that bad .h file). Does that work or error? Then we know whether it is somehow to do with the dataMgmt.H file or not....

                  SPlattenS Offline
                  SPlattenS Offline
                  SPlatten
                  wrote on last edited by
                  #11
                  This post is deleted!
                  JonBJ 1 Reply Last reply
                  0
                  • SPlattenS SPlatten

                    This post is deleted!

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #12

                    @SPlatten
                    And what have you done about the suggestion?

                    SPlattenS 2 Replies Last reply
                    0
                    • JonBJ JonB

                      @SPlatten
                      And what have you done about the suggestion?

                      SPlattenS Offline
                      SPlattenS Offline
                      SPlatten
                      wrote on last edited by
                      #13
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • JonBJ JonB

                        @SPlatten
                        And what have you done about the suggestion?

                        SPlattenS Offline
                        SPlattenS Offline
                        SPlatten
                        wrote on last edited by
                        #14

                        @JonB , same result:

                        client.C:11:10: fatal error: QColor: No such file or directory
                         #include <QColor>
                                  ^~~~~~~~
                        compilation terminate
                        
                        JonBJ jsulmJ 2 Replies Last reply
                        0
                        • SPlattenS SPlatten

                          @JonB , same result:

                          client.C:11:10: fatal error: QColor: No such file or directory
                           #include <QColor>
                                    ^~~~~~~~
                          compilation terminate
                          
                          JonBJ Offline
                          JonBJ Offline
                          JonB
                          wrote on last edited by
                          #15

                          @SPlatten
                          So maybe you do not have the necessary files in the Qt installation area, or it's using a different Qt installation area from what you think it should....

                          • Try different #include <...> statements using something else than QColor. Is it QColor only, or are others not found?
                          • Create a brand new, standalone, tiny project, not the whole project you are using now. Does it work or fail there?
                          SPlattenS 1 Reply Last reply
                          0
                          • SPlattenS SPlatten

                            @JonB , same result:

                            client.C:11:10: fatal error: QColor: No such file or directory
                             #include <QColor>
                                      ^~~~~~~~
                            compilation terminate
                            
                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #16

                            @SPlatten How did you install Qt and are you sure you use Qt version you want to?

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

                            SPlattenS 1 Reply Last reply
                            0
                            • JonBJ JonB

                              @SPlatten
                              So maybe you do not have the necessary files in the Qt installation area, or it's using a different Qt installation area from what you think it should....

                              • Try different #include <...> statements using something else than QColor. Is it QColor only, or are others not found?
                              • Create a brand new, standalone, tiny project, not the whole project you are using now. Does it work or fail there?
                              SPlattenS Offline
                              SPlattenS Offline
                              SPlatten
                              wrote on last edited by
                              #17

                              @JonB , the structure of this project contains many sub-projects each with they're own .pro files. I've search all the projects for the same inclusion:

                              grep -Rnw ./ -e "#include <QColor>"
                              

                              And I have found other instances, then checked the .pro content for these and they don't appear to be any different.

                              I know this isn't logical, if I go to the local directory containing the .pro for the project I'm having difficulty with and execute:

                              make clean
                              make depend
                              make
                              

                              It builds with no errors, its the same process from the parent that is when I get the error.

                              JonBJ J.HilkJ 2 Replies Last reply
                              0
                              • jsulmJ jsulm

                                @SPlatten How did you install Qt and are you sure you use Qt version you want to?

                                SPlattenS Offline
                                SPlattenS Offline
                                SPlatten
                                wrote on last edited by
                                #18

                                @jsulm , unfortunately thats completely out of my control, the laptop I'm using is supplied by my client, installed with RedHat 7.2 and Qt, the version of Qt is specific to the project.

                                1 Reply Last reply
                                0
                                • SPlattenS SPlatten

                                  @JonB , the structure of this project contains many sub-projects each with they're own .pro files. I've search all the projects for the same inclusion:

                                  grep -Rnw ./ -e "#include <QColor>"
                                  

                                  And I have found other instances, then checked the .pro content for these and they don't appear to be any different.

                                  I know this isn't logical, if I go to the local directory containing the .pro for the project I'm having difficulty with and execute:

                                  make clean
                                  make depend
                                  make
                                  

                                  It builds with no errors, its the same process from the parent that is when I get the error.

                                  JonBJ Offline
                                  JonBJ Offline
                                  JonB
                                  wrote on last edited by
                                  #19

                                  @SPlatten said in fatal error: QColor: No such file or directory:

                                  And I have found other instances, then checked the .pro content for these and they don't appear to be any different.

                                  Please explain things clearly! "don't appear to be any different." might mean they have the same line and they (a) do work without the error or (b) do not work and show the same error .....

                                  Anyway, I can only suggest you discover the exact compilation command-line being used. #include <...> should only look in system directories. Are these somehow different for the faulting case, that is all I can think of.

                                  SPlattenS 1 Reply Last reply
                                  0
                                  • JonBJ JonB

                                    @SPlatten said in fatal error: QColor: No such file or directory:

                                    And I have found other instances, then checked the .pro content for these and they don't appear to be any different.

                                    Please explain things clearly! "don't appear to be any different." might mean they have the same line and they (a) do work without the error or (b) do not work and show the same error .....

                                    Anyway, I can only suggest you discover the exact compilation command-line being used. #include <...> should only look in system directories. Are these somehow different for the faulting case, that is all I can think of.

                                    SPlattenS Offline
                                    SPlattenS Offline
                                    SPlatten
                                    wrote on last edited by
                                    #20

                                    @JonB , I used grep to find the same include in other projects that do compile without error:

                                    grep -Rnw ./ -e "#include <QColor>"
                                    

                                    I then looked at the .pro file. I cannot see anything that I have done differently.

                                    1 Reply Last reply
                                    0
                                    • kkoehneK Offline
                                      kkoehneK Offline
                                      kkoehne
                                      Moderators
                                      wrote on last edited by
                                      #21

                                      Can you show the full command line for the compiler call that fails?

                                      Director R&D, The Qt Company

                                      SPlattenS 1 Reply Last reply
                                      0
                                      • kkoehneK kkoehne

                                        Can you show the full command line for the compiler call that fails?

                                        SPlattenS Offline
                                        SPlattenS Offline
                                        SPlatten
                                        wrote on last edited by
                                        #22
                                        This post is deleted!
                                        JonBJ 1 Reply Last reply
                                        0
                                        • SPlattenS SPlatten

                                          This post is deleted!

                                          JonBJ Offline
                                          JonBJ Offline
                                          JonB
                                          wrote on last edited by JonB
                                          #23

                                          @SPlatten said in fatal error: QColor: No such file or directory:

                                          -I/usr/include/qt5 -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore

                                          Are these the directories where Qt's include files including for QColor are located?
                                          How does this command line compare against one issued for a file which does find <QColor>?

                                          SPlattenS 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