[英]Running C file in Visual Studio Code (Windows) without error - #include stdio.h cannot open source file
#include stdio.h cannot open source file
; 和下載Visual Studio Code 並確保在擴展中安裝C/C++
和C/C++ Extension Pack
Go 到Remote Explorer
-> Select Connect to WSL
( https://i.stack.imgur.com/fLVNw.png )
Go到文件->打開文件夾->進入C目錄/mnt/c
輸入Ctrl + Shift + P
-> Type configurations
-> Select (UI)
-> 在Complier Path
中輸入/usr/bin/gcc
最后, x86
將IntelliSenseMode
設置為linux-gcc-x64
或任何x64
編譯器,而不是x86 ,因為x64
適用於 32 位編譯器,而x84
適用於 64 位編譯器,Ubuntu 工作區中的Ubuntu
可能不支持。 ( https://i.stack.imgur.com/qT8zU.png )
瞧! 之后不應該有任何squiggle lines
。
如果對您有幫助,請為這個答案Vote
!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.