I wrote a text editor application which I want to compile statically. I followed the instructions outlined on this page.

I went to the directory where all the source files were. Ran:

1. mingw32-make clean //no problems
2. qmake -config release //no problems
and finally
3. mingw32-make

, and that's where I got a list of errors all caused by the #include statements in my code. Like, if I wrote #include <QMainWindow>, i'd get an error

QMainWindow: no such file or directory.

What am I doing wrong?

2

There are 2 best solutions below

0
On BEST ANSWER

In your .pro try this line: "QT += gui"

0
On

In MSVC2010 using qmake nmake I resolved this by replacing instances of

#include <QMainWindow>

with

#include <QtWidgets/QMainWindow>