VScode报错:undefined reference to ‘WinMain’ collect2.exe: error: ld returned 1 exit status

mingw32/lib/…/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to `WinMain’
collect2.exe: error: ld returned 1 exit status

因为VScode不是你Run代码就会自动保存,需要你先保存代码Ctrl+s,之后再运行即可。

你可能感兴趣的:(杂,vscode)