I wanted to compile C by MinGW in Visual Studio Code, but I got an error code at the terminal. I completely installed MinGW and copied its path to paste it into the path. This the error code in the compiler-
PS C:\Users\ariji\Documents\C C++> cd "c:\Users\ariji\Documents\C C++\" ; if ($?) { gcc main.c -o main } ; if ($?) { .\main }
C:/Program Files (x86)/mingw-w64/i686-8.1.0-posix-dwarf-rt_v6-rev0/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status