Results 1 to 2 of 2

Thread: Using Qt 5.7 with MSVC compiler

  1. #1
    Join Date
    Jan 2015
    Posts
    15
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Using Qt 5.7 with MSVC compiler

    Hi all, hope this is the right place to post my issue.
    From several days, i'm trying to compile my project with the new Qt 5.7 library on Windows 10.
    Before(Qt 5.5), i was using Mingw(still on Windows 10) and everyting was going fine.
    The problem is that in this project i need to use qtwebkit so i ported everything to qtwebengine.(qtwebkit seems to be replaced by qtwebengine http://doc.qt.io/qt-5/qtwebengine-overview.html)
    Unfortunately, Mingw does not support qtwebengine, so i had to download and use MSVC compiler from Visual Studio.
    Now everytime i try to compile with MSVC2013 compiler i get this error:

    C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(147) : fatal error C1189: #error : "No Target Architecture"

    and the compiler point me inside the file winnt.h:

    Qt Code:
    1. #elif !defined(RC_INVOKED)
    2. #error "No Target Architecture"
    3. #endif
    To copy to clipboard, switch view to plain text mode 

    what i'm doing wrong?

    Thanks to all.

  2. #2
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using Qt 5.7 with MSVC compiler

    I know this is very old, but I ran into the same problem and could not find a solution online, so I'm hopefully going to save someone else the trouble in the future.

    The problem is that you are missing either "_x86_" (for 32 bit) or "_AMD64" (for 64 bit) in your "DEFINES" variable. Additionally, in my case I ended up having to remove a few extra defines that Qt put in automatically. Here's how I fixed this issue in my .pro file:

    Qt Code:
    1. DEFINES += _AMD64_
    2. DEFINES -= WIN32 WIN64
    To copy to clipboard, switch view to plain text mode 

    Hope this helps.

Similar Threads

  1. Replies: 0
    Last Post: 10th June 2013, 01:54
  2. Configure Qcreator whit MSVC 2008 compiler
    By Ricardo_arg in forum Qt Programming
    Replies: 0
    Last Post: 27th August 2012, 15:23
  3. Replies: 8
    Last Post: 16th February 2011, 05:16
  4. msvc Compiler or mingw compiler
    By Ashutosh2k1 in forum Qt Programming
    Replies: 3
    Last Post: 14th February 2011, 08:33
  5. how to set QT Creator to use MSVC++ compiler instead of mingw
    By hcetiner in forum Installation and Deployment
    Replies: 5
    Last Post: 28th March 2010, 19:55

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.