All includes of Qt widgets says file not found. I've edited pro file but no luck
-
Hi all,
This is my first experience with Qt and I'm a little bit lost at the moment. It's been now 2 days around this problem but I can't find a solution.I've an existing project that I need to compile in Windows.
When I run my project several errors show up, but all of them related to the same thing: file not found
The files that are getting an error are:
- qt.h - this file I can't find it anywhere
- qapplication.h
- qbrush.h
...
Examples:
..\matchflow\fedit_canvas.cpp:36:16: fatal error: qt.h: No such file or directory
#include <qt.h>
^
compilation terminated.I've tried to add them to the pro file but no luck so far. I've tried to add those particular files to the project folder but no luck either.
Did anyone faced the same problem? Can anyone help me?
Any question please ask. -
Hi and welcome to devnet,
You're missing
QT += widgets
in your pro file. Don't forget to run qmake before trying to build.On a side note, you should replace the q*.h include by their camel case equivalent e.g.
#include <QApplication>
-
@SGaist Hi and Thank you very much for your help.
It helped a lot.
I'm now facing other issue related to the pro file but this time is with the boost library. I can't include the boost library. I only need 3 files and all of them are in boost folder (.../boost_1_58_0/boost).
But that is probably best to open another topic.
Once again, thanks a lot, you saved me a lot of time :)
-
After so many attempts without luck, the first attempt I try after writing this reply is a dfferent error :)
So the boost is no longer my problem.
For other people that my face the same problem as me, in the includepath just add: '$(BOOST_ROOT)'