1. 报错libmingw32.a(main.o)😦.text.startup+0xc0): undefined reference to `WinMain@16’
VsCode第一次编写C语言
#include<stdio.h>intmain(){printf("hello world\n");}
之后点击运行(安装vsCode插件Code Runner)报错
[Running] cd"f:\Space\CSpace\first\" && gcc hello.c -o hello && "f:\Space\CSpace\first\"hello
e:/apk/c/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: e:/apk/c/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned1 exit status[Done] exited with code=1 in0.232 seconds
解决方法:
VsCode点击运行–>添加配置,选中C++(Gcc/LLDW)–>接着选中gcc.exe…文件
之后点击运行即可