编译报错原因

时间:2022-07-24
本文章向大家介绍编译报错原因,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
make[1]: nds32le-elf-g++: Command not found
 ../scripts/rules.mk:105: recipe for target 'firmware' failed
 make[1]: *** [firmware] Error 127
 Makefile:181: recipe for target 'st' failed
 make: *** [st] Error 2

原因,没有添加编译链环境变量

export PATH=/usr/local/bin/nds32le-elf-mculib-v3/bin/:$PATH

添加永久环境变量:

vi /etc/profile

t添加

export PATH=/usr/local/bin/nds32le-elf-mculib-v3/bin/:$PATH

保存,然后source刷新刚才保存的。

source vi /etc/profile