Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

No compiler can produce code for this Qt version on 64 bit linux machine



  • Hello all,
    I am new to Qt Framework.
    I have built Qt 5.15.1 sources successfully for 32 bit on 64 bit Ubuntu (18.04) machine and the libraries and qmake files are installed in /usr/local/Qt_5.15.1 directory. (I have installed gcc-multilib & g++-multilib for compiling Qt 5.15.1 sources).
    For Qt creator, I have installed Qt 4.11 by executing qt-opensource-linux-x64-5.14.0.run file -> Developer and Designer Tools (Qt Creator 4.11.0).
    After adding Qt 5.15.1 qmake in Kits -> Qt Versions, am getting an error like "No compiler can produce code for this Qt version. Please define one or more compiler....". Attaching the screenshot for the same.
    Can anyone suggest me, how to resolve his error?

    85d2db49-40ba-4893-8968-b0fb674d8769-image.png


  • Lifetime Qt Champion

    Hi,

    Can you show what you have listed in the Compilers tab ?




  • Lifetime Qt Champion

    So since you installed Qt for 32bit (why do you want to compile something for 32bit?) you also have to install a compiler which ca produce 32bit binaries. As you see in your compiler tab QtCreator can't find one.



  • @Christian-Ehrlicher
    I have installed gcc-multilib and g++-multilib files on 64 bit Ubuntu machine for supporting 32 bit compilation. The GCC x86, 64 bit compiler can be used for producing 32 bit binaries by adding QMAKE_CXXFLAGS += -m32 in .pro file. If I have to install a 32 bit gcc or g++ compiler, can you please mention the steps for installing


  • Lifetime Qt Champion

    Than add a custom c/c++ compiler and provide the needed information.



  • @Praveen-Illa
    As @Christian-Ehrlicher says. But in case it's not clear: for whatever reason, Creator does not recognise that you say you do have an acceptable 32-bit compiler. So on your screenshot click the Add button at the right, and fill in all the information necessary for your desired compilation. You now have a kit you can use.



  • @JonB said in No compiler can produce code for this Qt version on 64 bit linux machine:

    on at the right, and fill in all the information necessary for your desired compilation. You now have a kit you can use.

    Thanks all for your support.
    Finally, I could achieve what I want. Now, I am able to compile it for 32 bit.
    Below are the steps for adding 32 bit compilers. Capturing here for others who are facing same problem
    • Select Compilers tab -> Add ->Custom -> C  This will create an entry in compilers page.
    o Assign, Name – My GCC - Desktop
    o Assign, compiler path - “/usr/bin/gcc”
    o Assign, Make Path – “/usrbin/make”
    o Assign, ABI – x86 – linux – generic – elf – 32 bit
    • Do the same for g++ compiler as well.
    • Select Qt versions -> Add -> Browse for compiled qmake file located in “/usr/local/Qt_5.15.1/bin/qmake”


Log in to reply