參考
Get Started with C++ and Windows Subsystem for Linux in Visual Studio Code
學習過程中出現
-
Executing task: C/C++: gcc 生成活動檔案 <
正在啟動生成... /usr/bin/gcc -g /home/huxiaohls/jump_test/.vscode/tasks.json -o /home/huxiaohls/jump_test/.vscode/tasks /usr/bin/ld:/home/huxiaohls/jump_test/.vscode/tasks.json: file format not recognized; treating as linker script /usr/bin/ld:/home/huxiaohls/jump_test/.vscode/tasks.json:1: syntax error collect2: error: ld returned 1 exit status
生成已完成,但出現錯誤. 終端程序啟動失敗(退出代碼: -1)。
終端将被任務重用,按任意鍵關閉。
解決辦法:
或者用run in code 插件運作