- How to run a C file in Visual Studio without:
- having error message
#include stdio.h cannot open source file
; and - not download mingw for Visual Studio Code?
- having error message
Asked
Active
Viewed 173 times
-1

WONG NICHOLAS _
- 87
- 9
1 Answers
1
Download Visual Studio Code & make sure you install
C/C++
&C/C++ Extension Pack
in extensionsGo to
Remote Explorer
-> SelectConnect to WSL
(https://i.stack.imgur.com/fLVNw.png)Go to File -> Open Folder -> enter C directory
/mnt/c
Enter
Ctrl + Shift + P
-> Typeconfigurations
-> Select(UI)
-> Enter/usr/bin/gcc
inComplier Path
Lastly, BE VERY SURE to set
IntelliSenseMode
tolinux-gcc-x64
or anyx64
compiler instead ofx86
becausex64
is for 32-bit compilers whilex84
is for 64-bit compilers which gcc inUbuntu
workspace might not support. (https://i.stack.imgur.com/qT8zU.png)Voila! There should not be any
squiggle lines
afterwards.
Please Vote
this answer if it helped you!

WONG NICHOLAS _
- 87
- 9