Results 1 to 6 of 6

Thread: how to set QT Creator to use MSVC++ compiler instead of mingw

  1. #1
    Join Date
    Mar 2010
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Question how to set QT Creator to use MSVC++ compiler instead of mingw

    how to set QT Creator(opensource) to use MSVC++ compiler instead of mingw ?
    I dont see any settings to choose a different compiler rather than mingw.
    the only way is vs addin ?

    thanks before answers.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: how to set QT Creator to use MSVC++ compiler instead of mingw

    see the project tab on the left. There set under "Build Steps" the corresponding spec to qmake.

  3. #3
    Join Date
    Mar 2010
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: how to set QT Creator to use MSVC++ compiler instead of mingw

    is there any step by step explaination wiki page for newbies how to setup QT Creator IDE to use MSVC compiler (for x86 and x64)?

    I set build steps to :
    qmake.exe "C:/Documents and Settings/Administrator/My Documents/qt3/qt3.pro" -spec win32-msvc2008 -r

    nothing builds
    'cl' is not recognized as an internal or external command,

    operable program or batch file.
    command failed with exit code 9009


    Why this is so hard ?
    Last edited by hcetiner; 28th March 2010 at 18:09.

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to set QT Creator to use MSVC++ compiler instead of mingw

    'cl' isn't in your path. You need to make it so.

    Run the visual studio command prompt - that will setup the path correctly, then you can use nmake.

    Or, you can include path in environment variable.

    Or, you can setup path in batch file before loading QtCreator.

    Simples.

  5. #5
    Join Date
    Mar 2010
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: how to set QT Creator to use MSVC++ compiler instead of mingw

    cmd :
    C:\Documents and Settings\Administrator>cl
    'cl' is not recognized as an internal or external command,
    operable program or batch file.

    another attempt on cmd:
    where cl
    INFO: Could not find files for the given pattern(s).

    -------------------------------------------
    Visual Studio 2008 x64 Win64 command Prompt :
    cl
    Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64
    Copyright (C) Microsoft Corporation. All rights reserved.

    usage: cl [ option... ] filename... [ /link linkoption... ]

    -------------------------
    Qt 4.6.1 Command Prompt :

    -- QTDIR set to C:\Qt\4.6.1
    -- Added C:\Qt\4.6.1\bin to PATH
    -- QMAKESPEC set to "win32-msvc2008"
    Setting environment for using Microsoft Visual Studio 2008 x86 tools.
    C:\Qt\4.6.1>cl
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
    Copyright (C) Microsoft Corporation. All rights reserved.

    usage: cl [ option... ] filename... [ /link linkoption... ]

    C:\Qt\4.6.1>
    -----------------------------------------------------------

    my Build Setting >Effective qmake call:
    qmake.exe "C:/Documents and Settings/Administrator/My Documents/gt4/gt4.pro" -spec win32-msvc2008 -r CONFIG+=release

    --------------
    Build result :

    Running build steps for project gt4...
    Starting: c:/qt/4.6.1//bin/qmake.exe C:/Documents and Settings/Administrator/My Documents/gt4/gt4.pro -spec win32-msvc2008 -r CONFIG+=release
    Exited with code 0.

    not compiles...
    -----------------------------------------------------------

    thanks for your helpings.
    Last edited by hcetiner; 28th March 2010 at 20:09.

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to set QT Creator to use MSVC++ compiler instead of mingw

    Isn't code 0 success?

Similar Threads

  1. Mingw vs MSVC?
    By vbman213 in forum Newbie
    Replies: 3
    Last Post: 18th February 2010, 08:51
  2. qmake for both msvc/mingw ?
    By gfunk in forum Qt Programming
    Replies: 2
    Last Post: 24th November 2007, 13:06
  3. How do I use MinGW Compiler in Windows
    By Walsi in forum General Discussion
    Replies: 3
    Last Post: 11th May 2007, 09:50
  4. MinGW Compiler under WXP
    By Walsi in forum Newbie
    Replies: 2
    Last Post: 30th March 2007, 18:26
  5. Where do I can download mingw compiler?
    By Illuminnator in forum General Discussion
    Replies: 3
    Last Post: 25th February 2007, 07: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.