Qt 5.0.2 how to set kit and compiler



  • hi guys...
    i am looking for a way or tutorial to set the compiler and kit in Qt 5.0.2 to start compile and run the app...
    after installing Qt 5.0.2 , as i wish to build or run an app , it says .... "Qt Creator needs a compiler setup to build.Configure a compiler in the kit options..."
    i want to compile a project for win 7 (pc platform) -64 bit and also for Android platform...
    how can i set kit and compiler settings in Menu->Tools->Options->Build And Run...
    please help ...


  • Moderators

    Do you have a compiler installed at all?
    When a compiler and a Qt version is installed kits and compilers are typically shown automatically.


  • Moderators

    My guess is that you either have no compiler installed or the wrong one. On windows each compiler and each version of it seems to be incompatible with every other:(

    Since the mingw Qt version includes a matching compiler that will be set up in creator, I assume you downloaded a MSVC something version of Qt. Since we can not include the MSVC compiler from microsoft you will need to install that separately. Please make sure to apply service packs to the compiler, too, before trying to work with it. You will need to get the same MSVC compiler version that Qt was build with. Creator will complain about any other MSVC version when setting up kits as the builds will not work.



  • hi and thanks for reply...
    i just installed qt 5.0.2 ...but when i want to test and run qt default projects or a new project file ,it throws me an error that says : “Qt Creator needs a compiler setup to build.Configure a compiler in the kit options…”.
    i understand that must install or manage a compiler or kit for chosen platform but as i try to set it in build and run options , it again throws same error and ... can't manage the compiler!!!
    i want a perfect tutorial for compiler management ...


  • Moderators

    There actually are instructions on how to set up compilers and kits in the Qt Creator manual. Not sure whether that counts as a perfect tutorial, but definitely as a good manual.

    Which compiler do you want to use for your projects? Is it installed already? What is the full name of the Qt package you installed (the compiler needed is part of the name)? Do these two match up exactly?



  • last week i downloaded MSVC version for windows ...
    "Qt 5.0.2 for Windows 64-bit (VS 2012, 500 MB)"

    but now i want to change my question...
    i use win 7 64 bit and want to compile an application for windows and also for android platforms...
    and all i want to know is that which version and creator is suitable to download and work...


  • Moderators

    Ok, so we get the first useful piece of information: You are indeed using a MSVC Qt flavor.

    You need MSVC 2012 from Microsoft to work with that version of Qt. Do you have that installed?



  • thanks...Tobias Hunger
    no i don't but i have installed visual studio.net 2010 ...
    as i know , some compilers will install automatically when we install microsoft visual studio.net but
    do you mean that i must install microsoft MSVC 2012 and then try to identify it for qt compiler manager and then run my application?
    also i am looking for a perfect tutorial for managing compilers and ... in kits,qt versions,compilers tabs to build and run a project...thx


  • Moderators

    As I said before: You need the same version of the same compiler that was used to build Qt. So, yes, you will need MSVC 2012 with that version of Qt. You could also download Qt built with MSVC 2010 though.



  • thanks...a lot...,is it necessary to identify the msvc 2012 in qt build and run options after installing msvc?
    i guess that you mean installing the compiler is like installing exe files...


  • Moderators

    Installing the compiler like downloading visual studio (or whatever else contains the compiler, I don't use windows too often;) and installing it.

    Creator will pick up MSVC installations automatically. You might need to check the kits and set the compiler there though.

    For android you will need to install the Android NDK and related stuff as well as a Qt version for android. There are howtos in the wiki about how to set it all up.



  • thank you tobias...



  • hi beginners
    i have solved my problem...
    for solving the compiler trouble and adding it for beginners in Qt field,i must say that by installing microsoft visual studio.net 2012 ,this problem will be solved...and you can export and run your application by qt 5.0.2 64bit msvc 2012 version...so bear in mind that it's better to install visual studio.net beside qt msvc version...because it automatically installs all of compilers and kits that qt needs in 64bit msvc version...good luck..


  • Moderators

    Also make sure to install the Microsoft debugging tools if the debugger does not work. They used to come as a separate package a while back.

    Alternatively you can just install Qt built with mingw: That comes with a compiler and debugger as part of the package.



  • tnx ... I will surely do it.... but i think mingw is just for win32bit yet not for 64 bit!!!my win version is win 7 64bit...



  • Ubuntu 13.04., QT5.0.2. problems with gcc correct startig up (in Ubuntu the newest vertion gcc 4.7 installed). In "Parameters" -> "compiler" in auto detecting there is not any compiler and there is not possibility to define it, only at next submenu. And as a result after trying to compile usual console c++ application "Hello World" we see the message : g++ error : not find a file... (something about it)



  • Sorry for my message not for this question. (i didnt know rules can i ask my question. Later on decided my problem in correct way.)
    best regars,
    Rais.


Log in to reply
 

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