Unsolved How to cross compile qt code from x64 linux to linux ARM
-
Hi,
I am trying to cross compile my qt code to be deploy in linux ARM machine.
I have searched online how to cross compile but I am not sure at one step which is load the qmake of the arm qt. When I load that it prompt "Exec format error". I have added gcc and g++ compiler for ARM inside qt and I am left with the qmake step which I am confuse about.
Does anyone know?
Thanks!
-
Do you have already a cross-compile toolchain for ARM installed?
Do you have Qt library source cross-compiled? -
-
@koahnig I have the tool chain for the arm. Do I also need to download the cross compile for arm qt?
-
@koahnig Do you mean the qt library in qt linux arm? If so I have also.
-
@qjqj said in How to cross compile qt code from x64 linux to linux ARM:
@koahnig I have the tool chain for the arm. Do I also need to download the cross compile for arm qt?
@qjqj said in How to cross compile qt code from x64 linux to linux ARM:
@koahnig Do you mean the qt library in qt linux arm? If so I have also.
You need to have a specific cross-compiler for your ARM device installed on the desktop computer you like to use for cross-compiling. As a general rule with this cross-compiler you need to cross-compile all source including all libraries. Note some cross-compiled libs might be already provided already where you can download the cross-compiler.
Therefore you need to install a specific cross-compiler for your ARM device. You need also in most cases to cross-compile qt libraries including its tools with your cross-compiler on your desktop. The important part after successful cross-compilation is the freshly generated qmake, which holds all information of your cross-compile toolchain. You need to make sure that this is used by Qt creator.
Note: Sometimes you can also find pre-cross-compiled Qt libs for some ARM or other embedded devices. However, they are mostly outdated versions, but may work better for tricky devices.See also the guide mentioned in here:
@pablo-j-rogina said in How to cross compile qt code from x64 linux to linux ARM:@qjqj this guide may help you regarding cross-compiling ARM on Linux...
There are other similar guides around.
-
Thanks for the guide! It was helpful