[Qt 5.3.1] Issue to to find its own source files
Hey guys I am currently trying to compile and build a project which I believe was done on Qt 4.x.x, but I'm not really sure.
The problem is that all Qt internal source files are having problems to find each other, basically they cannot find themselves if they are declared inside their respective folder, but when I remove the folder path and just keep the file name it works, but I don't think I'm supposed to do changes on these includes. Let me give an example to explain myself better:
Error: @ opt/Qt5.3.1/5.3/gcc_64/include/QtGui/qguiapplication.h:45
error: QtCore/qcoreapplication.h: No such file or directory
However, when remove the QtCore/ folder from the include leaving just #include <qcoreapplication.h> it manages to find the file. I suspect this is something that should be changed or added to the pro file, but I have no idea what. Anyway I'm attaching the pro file here so you guys can take a look as well.
@QT += core gui
QT += widgets
CONFIG += qt
TARGET = visor
TEMPLATE = app
SOURCES += main.cpp\
HEADERS += mainwindow.h \
FORMS += mainwindow.ui
pkg-config --cflags opencv
LIBS += -L/usr/local/lib
pkg-config --libs opencv
I though on removing all the folder all includes but there is simply a huge amount of Qt source files and it seems quite a incorrect way to solve the issue.
Hi and welcome to devnet,
Can you show an example of the include used in the project ? e.g. from customslider
On a side note, you can simplify the OpenCV handling with
CONFIG += link_pkgconfig
PKGCONFIG += opencv@
Sure, all the mess along Qt's internal source files starts when I call include QGuiApplication in my main.cpp:
int main(int argc, char *argv)
QApplication a(argc, argv);
BTW Thx for the side note :)
Looks strange… How did you install Qt ?
I bet when you set the prefix during the Qt build it was something that caused this problem.
Can you post the result of:
And where is your Qt located, full path to the include directory.
If my guess is right on this you can fix the path with a qt.conf file in your bin directory. I can give you the syntax for the file once I see your path and variables from qmake -query.