How to add multiple compiler for same Qt Creator



  • Hai Everyone,
    I have installed QT 5.7 (MSVC 2015) and its working fine. I would like to add MSVC 2013 compiler to Qt Creator. Kindly give me suggestion on how to do it...

    Thank you.....


  • Moderators

    @Vinoth-Rajendran-4 First of all: if you installed Qt 5.7 for MSVC2015 then you will not be able to use it with MSVC2013! This is not Qt restriction: on Windows you cannot mix different compilers for same application! You can either install MSVC2013 or Qt 5.7 for MSVC2013 (you can install many different Qt versions on same machine).
    Just go to "Tools/Options.../Build&Run/Compilers". If the compiler you need was not autodetected then click on add button and navigate to the compiler executable.
    But usually QtCreator autodetects compiler if they are installed properly. If you install MSVC then C++ compiler is usually not installed, so check you installation and add C++ if not installed.



  • Thanks for your reply @jsulm

    I have installed MSVC 2013 ,,, Qt Creator detects 2013 compiler..Not sure what i have to do next....

    qmake.exe for MSVC 2013 not detected in "Tools/Options.../Build&Run/Qt Versions"

    Kindly guide me...

    Thank you.......


  • Moderators

    @Vinoth-Rajendran-4 So, you installed Qt for MSVC2013?
    If it is not autodetected for some reason then just add it manually: press Add button, navigate to the bin directory of your Qt installation and select qmake.exe



  • @jsulm : I have not installed QT for MSVC2013 , just Visual Studio 2013...

    I believe by installing QT for MSVC 2013 only , i will be able to work with MSVC 2013 compiler in QT..... and not by just installing Visual Studio 2013 alone...

    correct me if i am wrong......


  • Moderators

    @Vinoth-Rajendran-4 If you want to use MSVC2013 you need to install it. If you want to use Qt then you need to install it. If you want to use Qt with MSVC2013 then you need to install Qt for MSVC2013. If you want to use Qt with MSVC2015 then you need to install Qt for MSVC2015.
    So, what do you want to do?

    You can use MSVC2013 compiler in QtCreator without installing Qt for MSVC2013, but in this case you will not be able to use Qt in your applications.


  • Moderators

    @Vinoth-Rajendran-4 said in How to add multiple compiler for same Qt Creator:

    work with MSVC 2013 compiler in QT

    What do you mean by "work with MSVC 2013 compiler in QT"? Qt is a framework, do you mean QtCreator?
    QtCreator can use any supported compiler. You can have many compilers installed and select one of them to build your project.



  • I meant QtCreator only.......

    Following Software i installed (for your reference) :
    QT for MSVC 2015 ( which comes with QtCreator)
    VIsual Studio 2013...

    QtCreator detects both my compiler msvc2015 and msvc2013 in "Tools/Options.../Build&Run/Compilers", but since i have installed only QT 5.7 for MSVC2015 , i am able to build my projects only with MSVC 2015....

    I guess i am required to install "QT for MSVC 2013" to build Qt project with it.

    Is there a way to just build non-QT project using MSVC 2013 with my existing QtCreator..

    Thank u.....


  • Qt Champions 2017

    Hi

    • I guess i am required to install "QT for MSVC 2013" to build Qt project with it.
      Yes. MUST match the compiler version! ( no exceptions)
      So Qt2013 -> Vs2013, NO mixing allowed :)

    Can I ask why u want both 2013 and 2015 installed?
    Last time I tried that, both stopped working.
    It is possible but might have cavecats
    https://msdn.microsoft.com/en-us/library/ms246609.aspx



  • I am trying to build an open source project named OpenIG (Image Generator) using QtCreator (vc++ 2015 compiler). Build Failed, and my guess is that it might be due to dependencies (static libaries) issue with vc++ 2015..

    For the sake of avoiding the time to download and install QT with MSVC 2013 , i thought there might be a way to just use already installed Visual Studio 2013 with existing QtCreator by tweaking somehow....

    Guess i am wrong about it....Will download that version.....

    Thanks for your patience @mrjj ....


  • Moderators

    @Vinoth-Rajendran-4 You can use MSVC2013 in QtCreator without Qt for MSVC2013 as long as the projects you build do not use Qt. Just create a Kit in QtCreator with MSVC2013 compiler and without Qt.



  • Just to try out a simple project to build with vc++ 2013 , i created a kit using Compiler set to Visual C++ Compiler 12.0 and Qt Version: mentioned as None and then tried to create a new project in Plain C++ Project(CMake Build) ...

    But it shows "Qt Creator has no kit that are suitable for CMake project. Please Configure a kit"...

    What am i missing when configuring the kit......


  • Moderators

    @Vinoth-Rajendran-4 said in How to add multiple compiler for same Qt Creator:

    What am i missing when configuring the kit

    CMake maybe?
    Do you have CMake installed on your system and if so is it set in the Kit you're trying to use?



  • This post is deleted!


  • Thank you @jsulm ....

    My doubt got clarified....


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.