Solved LTO Error on addition of a button or a switch
i am new to the QT for MCUs world and just started with the first Hello world application. I could draw a text and also an image on the screen. However, on addition of a button or a switch even, i get the below attached error. LTO as i understood is Linking Time Optimization, is it something do with linking or import of any module?
lto1.exe:-1: error: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:155
lto-wrapper.exe:-1: error: fatal error: C:\Qt\Tools\QtMCUs\arm_gcc_8\bin\arm-none-eabi-g++.exe returned 1 exit status
:-1: error: error: lto-wrapper failed
:-1: error: collect2.exe: error: ld returned 1 exit status
Looking forward to the solution.
internal compiler error:
As you can see it's an internal compiler error - nothing Qt releated (but maybe triggered by a Qt construct/source code). Try to compile a simple hello world program to see if it works with this compiler.
Maybe upgrading the compiler also helps.
The compilation happens and the program runs successfully when i comment out the button code in QML and can see the text displayed on screen. Also, you can see the compiler details as attached. They were part of the installation of QT creator.
I don't see how Qt can do something against an internal compiler error of the compiler. Upgrade the compiler.
Probably this one:
Update your compiler, as @Christian-Ehrlicher wrote.