I wanted to use vscode for c/c++. I installed gcc,gdb and g++. But when I ran a simple hello world code, it's showing error like this.
**C:/Users/aathi/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/aathi/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): in function `main':
C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status**
The code I wrote is
#include<stdio.h>
int main(){
printf("Hello world");
return 0;
}
Pls tell me what to do abt this as I spend alot of time to get this instaled and setup only for this error to show up!