编译2021年师资培训教材的lab2 的Nios工程遇到提示:

/root/Desktop/UserDisk/Labs/Work_Shop/lab2/software/seg7_decoder_test_bsp/HAL/src/alt_main.c:154:  undefined reference to `main' Makefile:1064: recipe for target 'seg7_decoder_test.elf' failed

 这是因为copy 了C代码以后要先点击保存,才能执行build project:

 因为没有保存代码的main.c文件里面还是空的,编译的时候自然是找不到main 函数的。