mac下 vscode 报错 Undefined symbols for architecture arm64:

错误信息

Undefined symbols for architecture arm64:
  "_rnnoise_create", referenced from:
      _main in rnnoise_demo-685f71.o
  "_rnnoise_destroy", referenced from:
      _main in rnnoise_demo-685f71.o
  "_rnnoise_process_frame", referenced from:
      _main in rnnoise_demo-685f71.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

临时解决方案

mac下 vscode 报错 Undefined symbols for architecture arm64:_第1张图片

mac下 vscode 报错 Undefined symbols for architecture arm64:_第2张图片

 

 在tasks.json 中 args 下-g 后把用到的.c 文件都加上。

参考文章:

Mac OS - VS Code Insiders - Code Runner:架构 arm64 的未定义符号(Mac OS - VS Code Insiders - Code Runner: Undefined symbols for architecture arm64)答案 - 爱码网

你可能感兴趣的:(macos,vscode,c语言)