MacBook vscode编写C语言无法使用头文件进行编程

问题遇到的现象和发生背景

使用M1 MacBook使用VsCode进行C的编写时候,其他的时候都可以编译通过,但是使用头文件的方式就会报错。

问题相关代码,请勿粘贴截图

dream_ovo@deMacBook-Air Three_Chess % cd "/Users/dream_ovo/Documents/MyC/Three_Chess/" && gcc test.c -o test && "/Users/dream_ovo/Docu
ments/MyC/Three_Chess/"test
Undefined symbols for architecture arm64:
"_DisplayBoard", referenced from:
_game in test-829be1.o
"_InitBoard", referenced from:
_game in test-829be1.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

运行结果及报错内容

我的解答思路和尝试过的方法

使用网上的autosave等均无效

我想要达到的结果

编译通过

img

game.h的实现在game.c中,因此需要tast.c和game.c一起编译。
task.json中修改编译参数,添加game.c