Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross Compiling for arm

I am writing a c++ application and trying to cross compile for arm: sudo apt-get install gcc-4.4-arm-linux-gnueabi

However in the /usr/arm-linux-gnueabi/include directory I find no c++ directory. Can someone tell me where to find it?

like image 993
user1179510 Avatar asked Jul 19 '12 04:07

user1179510


People also ask

How do you cross-compile arms with gcc?

Save this answer. Install gcc-arm-linux-gnueabi and binutils-arm-linux-gnueabi packages, and then just use arm-linux-gnueabi-gcc instead of gcc for compilation. This brings in the complete cross-compile environment, including binutils. On Ubuntu 13.10 you get gcc-4.7 for 'gnueabi' and gcc-4.8 for 'gnueabihf'.

What is cross compiling used for?

A cross compiler is useful to compile code for multiple platforms from one development host. Direct compilation on the target platform might be infeasible, for example on embedded systems with limited computing resources. Cross compilers are distinct from source-to-source compilers.

What is the cross-compilation process?

Cross-compilation is the act of compiling code for one computer system (often known as the target) on a different system, called the host. It's a very useful technique, for instance when the target system is too small to host the compiler and all relevant files.


1 Answers

Install C++ compiler:

sudo apt-get install g++-4.4-arm-linux-gnueabi
like image 82
Dmitry Poroh Avatar answered Oct 04 '22 17:10

Dmitry Poroh