当前位置: 代码迷 >> 综合 >> VScode报错:undefined reference to ‘WinMain’ collect2.exe: error: ld returned 1 exit status
  详细解决方案

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

热度:91   发布时间:2024-03-09 13:57:45.0

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,之后再运行即可。

  相关解决方案