PDA

View Full Version : Qt 5.9 Fails to generate visual studio project



mentalmushroom
6th June 2017, 13:15
I have VS2015 and VS2008 installed on my system along with several versions of Qt, including Qt 5.9 (official installer). In order to generate a visual studio project from a .pro file I use this command:


C:\Qt\5.9.0-win32\5.9\msvc2015\bin\qmake.exe -tp vc dm.pro


or this one:

C:\Qt\5.9.0-win32\5.9\msvc2015\bin\qmake.exe -spec win32-msvc -tp vc dm.pro

Both fail equally with the following response:


C:/Qt/5.9.0-win32/5.9/msvc2015/mkspecs/features/toolchain.prf:129: Variable QMAKE_CXX.COMPILER_MACROS is not defined.
Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set


In Qt 5.8, Qt 5.7, and Qt 4.8 everything works fine. Am I doing anything wrong?

d_stranz
6th May 2018, 17:10
Ever find a solution to this? I'm seeing it now, trying to import qwt.pro into MSVC for qwt 6.1.3. Nothing I find via Google has an answer.

Edit: I did find one thing which worked: added

QMAKE_MSC_VER = 1800

for Visual Studio 2013 at the top of the "msvc-version.conf" file in the mkspecs\common directory of my Qt installation.

Unfortunately, the project file that was generated won't build because of syntax errors in the moc command. Not sure if I want to waste my time trying to fix it instead of simply building a project manually fro the source files.