Results 1 to 2 of 2

Thread: Qt 5.9 Fails to generate visual studio project

  1. #1
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 26 Times in 23 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Qt 5.9 Fails to generate visual studio project

    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:
    Qt Code:
    1. C:\Qt\5.9.0-win32\5.9\msvc2015\bin\qmake.exe -tp vc dm.pro
    To copy to clipboard, switch view to plain text mode 

    or this one:
    Qt Code:
    1. C:\Qt\5.9.0-win32\5.9\msvc2015\bin\qmake.exe -spec win32-msvc -tp vc dm.pro
    To copy to clipboard, switch view to plain text mode 

    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?
    Last edited by mentalmushroom; 6th June 2017 at 14:26.
    Magicians do not exist

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,024
    Thanks
    233
    Thanked 642 Times in 632 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Qt 5.9 Fails to generate visual studio project

    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.
    Last edited by d_stranz; 6th May 2018 at 17:37.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 0
    Last Post: 20th February 2013, 10:07
  2. Debug Qt project via Visual Studio
    By Ali Reza in forum Newbie
    Replies: 1
    Last Post: 16th June 2012, 17:11
  3. Visual Studio Project Name
    By fruzzo in forum Qt Programming
    Replies: 2
    Last Post: 2nd April 2012, 10:32
  4. Visual Studio Project file
    By fruzzo in forum Newbie
    Replies: 0
    Last Post: 3rd November 2011, 14:11
  5. Qt 4 and Visual Studio 2005 Add-in project
    By JSPoly in forum Qt Programming
    Replies: 10
    Last Post: 23rd January 2007, 22:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.