vscode的一个小问题
2019-12-18 本文已影响0人
技术笔记
发现没有删除编译好的文件时再次编译,会有这个报错:
> Executing task: /usr/bin/gcc '-Wall' -std=c99 '/home/testcode/sample/c/sort/.vscode/tasks.json' -o 'tasks' <
/usr/bin/ld:/home/testcode/sample/c/sort/.vscode/tasks.json: file format not recognized; treating as linker script
/usr/bin/ld:/home/testcode/sample/c/sort/.vscode/tasks.json:1: syntax error
collect2: error: ld returned 1 exit status
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
删除后好了:
> Executing task: /usr/bin/gcc '-Wall' -std=c99 '/home/testcode/sample/c/sort/main.c' -o 'main' <
Terminal will be reused by tasks, press any key to close it.
原因可能是我切换gcc,g++后需要删除
如果一直都是gcc就不会有问题。