#includeint main() { printf("hello worldn"); }
之后点击运行(安装vsCode插件Code Runner)报错
[Running] cd "f:SpaceCSpacefirst" && gcc hello.c -o hello && "f:SpaceCSpacefirst"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 returned 1 exit status [Done] exited with code=1 in 0.232 seconds
解决方法:
VsCode点击运行–>添加配置,选中C++(Gcc/LLDW)–>接着选中gcc.exe…文件
之后点击运行即可
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)