Click here to Skip to main content
15,070,379 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If I desire to crosscompille my C+ code on my PC , running Ubuntu and having working crosscompiler tools, do I need to have SAME crosscompiler tools installed
on my remote system - RPi
?If so , then why ?

What I have tried:

Install crossomplier tools on RPi =- why ?
Posted
Updated 16-Sep-21 9:19am
v2

1 solution

If you have a the correct crosscomplier tools on your Ubuntu system, you do not need to have any build tools on the RPi. The executables you build on the PC should run fine on the Pi. If you are not building statically linked programs, then you do need to make sure that you have a compatible libstdc++ on both the PC and the Pi. E.G. If the crosscomiler on the PC targets libstdc++ for GCC11, and the Pi only has libstc++ for GCC9, then you might not be able to run the final program on the Pi. The same is true for any other libraries you might link to, for example openssh/ssl, Gnome, http processing etc.

OTOH, a Pi 4 with 8G of RAM is more powerful than even top-of-the line PCs and some mainframes from only a few years ago. If you are running into library compatiblity issues, you should be able to develop/develop your program on the PC, and then have a final compile and conformance test on the Pi.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900