0

I am facing this issue where I am getting an error while running the code "hello world".

error is

c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/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

Screenshot of vs code

Here is the screenshot

John Conde
  • 217,595
  • 99
  • 455
  • 496
Varun
  • 1
  • 2
    Does this answer your question? [undefined reference to \`WinMain@16' collect2.exe: error: ld returned 1 exit status](https://stackoverflow.com/questions/16946307/undefined-reference-to-winmain16-collect2-exe-error-ld-returned-1-exit-stat) – L. Scott Johnson Jun 28 '21 at 16:48
  • 1
    Where did you get the mingw32 from? If you get it via [MSYS2](https://www.msys2.org/) then it'll probably work fine. – rustyx Jun 28 '21 at 16:48
  • Or perhaps: https://stackoverflow.com/questions/53035451/undefined-reference-to-winmain16-while-compiling – L. Scott Johnson Jun 28 '21 at 16:49

0 Answers0