How to fix error while building/deploying project



  • I am new to qt and i have a problem. I installed QT opensource-windows-x86-msvc2013_64-5.5.0 . I went through youtube tutorial about creating Qt widgets application and as i run the code i got following error message

    23:39:27: Configuration is faulty. Check the Issues view for details.
    Error while building/deploying project untitled1 (kit: Desktop Qt 5.5.0 MSVC2013 64bit)
    When executing step "Make"

    please help me :) hope you will reply


  • Moderators

    Hi and welcome to devnet

    Are you using Qt creator?
    Go to "Tools"->"Options"->"build&run" and check under tabs (kits), (Qt versions) and (Compilers).
    Which kits are installed?
    Which Qt versions?
    Which compilers?



  • Yes I am using Qt creator..
    Kits intalled : Desktop Qt %{Qt:Version} MSVC2013 64bit
    Qt version : 5.5
    Compiler : MinGW



  • Hello,
    You need to use the same compiler as the Qt version. In your case Visual Studio 2013. If you want to use MinGW then you need to install the MinGW Qt version. IF you want 64 bit with MinGW you will have to build it yourself from source.
    Paul


  • Moderators

    Paul H. is completely correct. Actually not much to add.
    You need to ensure compatibility of kits and compilers. Qt creator shows you also stop signs with exclamation mark for incompatible selections (at previous Qt creator version 3.1).

    MSVC compilers (express version) you have to load from Mircosoft download page or buy a license.

    64 bit MinGW version can be downloaded also here., but those are not official Qt builds.
    Personal recommendation and experience: 64 bit compilations are in most cases not required. Exes get bulkier and sometimes even slower.



  • Hi,
    I am also facing issues while building qt program Im using

    Kit: Desktop Qt 5.7 GCC 64bit
    Qt version: Qt 5.7 GCC 64bit
    compiler: GCC(x86 64 bit)



  • I get this error:
    g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../chk/tr1 -I. -I/opt/Qt5.7.0/5.7/gcc_64/include -I/opt/Qt5.7.0/5.7/gcc_64/include/QtWidgets -I/opt/Qt5.7.0/5.7/gcc_64/include/QtGui -I/opt/Qt5.7.0/5.7/gcc_64/include/QtCore -I. -I. -I/opt/Qt5.7.0/5.7/gcc_64/mkspecs/linux-g++ -o main.o ../../../chk/tr1/main.cpp
    cc1plus: error: unrecognized command line option "-std=gnu++11"
    make: *** [main.o] Error 1
    make: Leaving directory `/home/Prerna/Desktop/example/ex2/tr1'
    11:37:33: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project tr1 (kit: Desktop Qt 5.7.0 GCC 64bit)
    When executing step "Make"


  • Moderators

    @prerna

    You need to check the actual gcc version number. You are using already the correct 64 bit model, but probably the GCC version is fairly old and requires an update in your OS distro. The compiler complains that it does not recognize the gnu++11 setting.
    According to this webpage you have a compiler version GCC 4.6 or older in use.



  • yes i have gcc4.4. Can you please tell me how to update it to 4.8? with steps?


  • Moderators

    @prerna

    This looks a bit like you are using a pretty old linux distro. Therefore, you should check also if you cannot get to a newer linux distro.
    But you better check also, if your PC specifications will allow for an update to a more recent linux distro.

    Concerning the GCC update to a more recent version, you should consult the webpage for your linux distro on assistance for this. There you should be able to get more detailed information on how and where to.

    In general all distros have a way to update the SW to more recent versions. Check there. If you cannot get a newer version than the one you are using already, you can go and get it from GNU gcc webpage.
    Personally I would be careful with trying the GNU gcc update, if you have not much experience. Typically all those tools are linked to another one. If you start changing one to have update others as well.
    Therefore, the recommendation to check the whole linux distro first. More recent distros you have everything fitting together, which makes live mauch easier.



  • Thank you for the information Koahnig, it was working when i installed gcc4.8.2 version. The gcc version 4.4 was not working with Qt5.7


  • Moderators

    @prerna said in How to fix error while building/deploying project:

    it was working when i installed gcc4.8.2 version. The gcc version 4.4 was not working with Qt5.7

    Qt 5.7 requires C++11.

    GCC 4.4 is too old to support C++11.


Log in to reply
 

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