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

Problem with Cross compiling



  • Hi Community,
    I want to Cross Compile from Windows 10 to Raspberry pi 3 with linux.
    Everything works fine, I can cross compile my Applications with QTCreator.
    But I have one Problem.
    If I add something to the Pro File. Then I get a warning:

    Warning: "C:\SysGCC\Raspberry\bin\arm-linux-gnueabihf-g++" is used by qmake, but "C:\SysGCC\Raspberry\bin\arm-linux-gnueabihf-g++.exe" is configured in the kit.
    Please update your kit or choose a mkspec for qmake that matches your target environment better.

    This gives me many Problems, so I can't add to qt += as example serialport.
    Or to config += lang-all ( for the virtual Keyboard).

    Cause in the Folder \SysGCC\Raspberry\bin\ there ist only arm-linux-gnueabihf-g++.exe in Windows.

    Do you have any suggestions?

    Best regards,
    Husky


  • Moderators

    Modify the mkspecs to point to the .exe. Or create a symlink without ".exe", I think new windowses do support such thing (not sure).



  • This post is deleted!


  • @sierdzio Hi thanks for the answer. Is it possible to change the makespec after building?


  • Moderators

    @Husky said in Problem with Cross compiling:

    @sierdzio Hi thanks for the answer. Is it possible to change the makespec after building?

    Well, kind of. If you change it after building, it will affect all future builds (of your application). It does not have any effect on Qt which you have already compiled. So if you had some compilation issues when comiling Qt, you need to adjust mkspecs and then recompile Qt.



  • @sierdzio So if I understand it right. I have to change the mkspec to ...gcc.exe instead of gcc. And then I have to recompile the whole qt on my target device?


  • Moderators

    Try without recompiling Qt first - it might be enough in your case to only update it to gcc.exe and recompile your application.


  • Lifetime Qt Champion

    @Husky You could just rename gcc.exe in gcc (or copy gcc to gcc.exe) :-)



  • HI @Husky ,

    I assume you did, but did you use the same compiler to build your qmake (QMAKE_XSPEC value in the Qt Version detail) that the one you use to configure your Kit ?

    If it helps this is my confguration :

    https://pasteboard.co/1oTFoCeh3.png



  • Hi thanks to all.
    Sry for my late reply, I wasn't at home the last week.

    https://forum.qt.io/topic/68381/cross-compile-qt-windows-to-raspberry-3

    I use this instruction to build my toolchain.
    But I have this problem and didn't get it worked corecctly.
    I tried to rename but it doesn't work. Have someone an instruction how I can change, the mkspec. To the last reply my settings are the same as yours only that by xspec I have /device/rpi3-g++.

    I have absolutly no idea why I get this warning. I can compile my Applications without Problems. But if I add something to CONFIG=+ it doesn't work.

    Best regards, Husky


Log in to reply