我已经安装了arm交叉编译包
sudo apt install -y build-essential gcc-arm-linux-gnueabi
如果我编译hello.c
文件,它会完美运行
arm-linux-gnueabi-gcc hello.c
如果我使用hello.cpp
文件,它会报错
arm-linux-gnueabi-gcc hello.cpp
显示如下错误
arm-linux-gnueabi-gcc: error trying to exec 'cc1plus': execvp: No such file or directory
请帮助我。
最佳答案
安装g++-arm-linux-gnueabi
:
sudo apt install -y g++-arm-linux-gnueabi
并改为调用 arm-linux-gnueabi-g++
:
arm-linux-gnueabi-g++ hello.cpp
关于c++ - 如何交叉编译C++文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59676966/