Reputation: 49
I am trying to compile C++ code for ARM architecture. I don't know exactly the full name of processor (waiting for information from some hardware guy), I know only it is some ARM. The problem which I have. I use command in order to compile my resource files for ARM architecture:
arm-linux-gnueabi-g++ myApp.cpp -g -Wall -o myApp
and also
arm-linux-gnueabi-gcc myApp.cpp -g -Wall -lstdc++ -o myApp
and gets output:
-bash: arm-linux-gnueabi-g++: command not found
and
-bash: arm-linux-gnueabi-gcc: command not found
In linux which I used I am not sure if there is installed gcc,g++ arm package... There is:
locate arm-none-linux-gnueabi-
locate arm-linux-gnueabihf-g++
locate arm-linux-gnueabihf-gcc
, there is none:
locate arm-linux-gnueabi-g++
locate arm-linux-gnueabi-gcc
I am not allowed to do some tries and install arm package, because this linux is running on some server to which many developers are attached. setting PATH in shell:
PATH=$PATH:/opt/eds/x86_64/13.1-2/embedded/ds-5/bin/arm-linux-gnueabihf-g++
or with gcc doesn't solve the issue. Setting it in:
~/.bashrc
also doesn't solve the issue because additional problems occurs, I cannot connect to linux server. Thanks in advance for any help.
Upvotes: 5
Views: 29049
Reputation: 159
for kernel or uboot cross compiling below commands are enough:
sudo apt-get install -y gcc-arm-linux-gnueabihf
sudo apt-get install -y libncurses-dev
sudo apt-get install -y libqt4-dev pkg-config
sudo apt-get install -y u-boot-tools
sudo apt-get install -y device-tree-compiler
but for c++ cross compiling you should install g++ using below command:
sudo apt-get install g++-arm-linux-gnueabihf
Upvotes: 10