No such file or directory
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.
QtGui/qwindowdefs.h: no such file or directory.
Which version of the Qt , are you using ?
Oh, sorry, it's 5.5!
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?
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.
Hi and welcome to devnet,
Can you show your .pro file ?
Sure can, here she is:
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.
#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.
CONFIG -= qt, remove that line.
Oh, wow, I musta skimmed right over that.
Thanks, you hero, you!