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. No such file or directory
Forum Updated to NodeBB v4.3 + New Features

No such file or directory

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 4 Posters 3.8k Views 2 Watching
  • 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.
  • S Offline
    S Offline
    SixFish
    wrote on last edited by
    #1

    Qt newbie here--I've installed the source files, but whenever I try to use them, I get loads of errors reading, for instance, QtGui/qwindowdefs.h: no such file or directory.
    The errors seem to be originating from inside the Qt library, so I'm sure I've forgotten to do something simple like add the path to my .pro file, but I'd appreciate a nudge in the right direction!
    It all seems to work when I create a new project, but when I open an existing one and add the necessary lines to the .pro file, it fails.

    I'm running on a Linux x86 platform.

    Ni.SumiN 1 Reply Last reply
    0
    • S SixFish

      Qt newbie here--I've installed the source files, but whenever I try to use them, I get loads of errors reading, for instance, QtGui/qwindowdefs.h: no such file or directory.
      The errors seem to be originating from inside the Qt library, so I'm sure I've forgotten to do something simple like add the path to my .pro file, but I'd appreciate a nudge in the right direction!
      It all seems to work when I create a new project, but when I open an existing one and add the necessary lines to the .pro file, it fails.

      I'm running on a Linux x86 platform.

      Ni.SumiN Offline
      Ni.SumiN Offline
      Ni.Sumi
      wrote on last edited by
      #2

      @SixFish said in No such file or directory:

      QtGui/qwindowdefs.h: no such file or directory.

      Which version of the Qt , are you using ?

      1 Reply Last reply
      1
      • S Offline
        S Offline
        SixFish
        wrote on last edited by
        #3

        Oh, sorry, it's 5.5!

        mrjjM 1 Reply Last reply
        0
        • S SixFish

          Oh, sorry, it's 5.5!

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @SixFish

          Hi if new projects works , it seems Qt is installed fine

          So if it complains about #include stuff then maybe its an older project ?
          Like for Qt4?
          https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5

          S 1 Reply Last reply
          1
          • mrjjM mrjj

            @SixFish

            Hi if new projects works , it seems Qt is installed fine

            So if it complains about #include stuff then maybe its an older project ?
            Like for Qt4?
            https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5

            S Offline
            S Offline
            SixFish
            wrote on last edited by
            #5

            It's a project that uses GTK, but I'm converting it over to Qt.
            I've tried adding Qt += widgets, to no avail.
            And yeah, I'm pretty sure my install is fine, I just don't know what to do to my .pro file to get it to link correctly.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi and welcome to devnet,

              Can you show your .pro file ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SixFish
                wrote on last edited by
                #7

                Sure can, here she is:

                QMAKE_TARGET =desktop

                QT += core gui
                greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

                TEMPLATE = app
                CONFIG += console
                CONFIG -= app_bundle
                CONFIG -= qt

                CONFIG += debug
                CONFIG += link_pkgconfig
                PKGCONFIG += gtkmm-2.4 libdc1394-2

                QMAKE_CFLAGS += -Wall
                QMAKE_CXXFLAGS += -std=c++0x

                QMAKE_CXXFLAGS += -funsigned-char
                QMAKE_CXXFLAGS += -fdiagnostics-show-option
                QMAKE_CXXFLAGS += -pthread
                #inserted by ide QMAKE_CXXFLAGS += -g
                QMAKE_CXXFLAGS += -Werror
                QMAKE_CXXFLAGS += -Wno-error=attributes
                #QMAKE_CXXFLAGS += -Wno-error=switch
                QMAKE_CXXFLAGS += -Wno-error=deprecated-declarations
                QMAKE_CXXFLAGS += -Wno-error=strict-aliasing
                QMAKE_CXXFLAGS += -Wno-error=unused-parameter
                QMAKE_CXXFLAGS += -Wno-error=unused-function
                #the following needed for setting timezone
                QMAKE_CXXFLAGS += -Wno-error=nonnull
                #using O2 with batch build
                QMAKE_CXXFLAGS += -O0
                #for debug of macros:
                #QMAKE_CXXFLAGS += -save-temps

                QMAKE_LFLAGS += -rdynamic
                #more stuff for sharing firmware files:
                DEFINES += HOST_SIM=1
                DEFINES += PermAllocPool=0
                DEFINES += isQCU=0
                DEFINES += isPCU=0
                DEFINES += ArtWithPosix=1
                DEFINES += ArtWithInet=1

                #todo: what is this for?
                DEFINES += HAVE_CONFIG_H
                #for cross fp
                DEFINES += linux
                DEFINES += LinkMTFxpro=0

                DEFINES += ShowLicenseGui
                DEFINES += DESK_DEBUG

                DEFINES += SocketWriteTimeLog=0

                DEPENDPATH += $$artpaths

                INCLUDEPATH += $$artpaths

                #This variable contains a list of libraries to be linked into the project. You can use the Unix -l (library) and -L (library path) flags and qmake will do the correct thing with these libraries on Windows (namely this means passing the full path of the library to the linker). The only limitation to this is the library must exist, for qmake to find which directory a -l lib lives in.
                #For example:
                #unix:LIBS += -L/usr/local/lib -lmath
                LIBS += -lcupsimage
                LIBS += -lcups

                LIBS += -lgssapi_krb5
                LIBS += -lgnutls
                LIBS += -lz
                LIBS += -lpthread
                LIBS += -lm
                LIBS += -lcrypt
                LIBS += -ldc1394

                I've left out the enormous list of headers and sources for sanity's sake.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  You have CONFIG -= qt, remove that line.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  2
                  • S Offline
                    S Offline
                    SixFish
                    wrote on last edited by
                    #9

                    Oh, wow, I musta skimmed right over that.
                    Thanks, you hero, you!

                    1 Reply Last reply
                    0
                    • T tugbakara referenced this topic on

                    • Login

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