Alek
Alek

Reputation: 91

Qt5.5 qmake don't generate proper .pro file

Currently, I'm using Qt5.5 with Visual Studio 2015. After making UI files, I want to make a .pro file using the command "qmake -project" (VS2015 environment is set). And the .pro file is generated. After that I pass "qmake -tp vc qtexample.pro " to create visual studio project. The project is created without problem.

When I'm trying to build the project, it shows me a lot of linking errors. After googling the problem, I found a solution - to add this line "QT += core gui widgets" in the .pro file.

So, my question is: Why didn't qmake write that line in the .pro file? What's wrong here? Should I always add manually this line in the .pro file? Is there any way to avoid manually adding the line?

Upvotes: 1

Views: 470

Answers (1)

CroCo
CroCo

Reputation: 5741

core and gui are added by default, however, widgets is not. This info is clearly stated in the documentation.

Upvotes: 1

Related Questions