2

When i am trying to compile c code on eclipse using mingw. getting below error.

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../libmingw32.a(main.o):(.text.startup+0xa7): 
 undefined reference to `WinMain@16'

how can i resolve this error.

Thanks in advance

Axel
  • 13,939
  • 5
  • 50
  • 79
anikhan
  • 1,147
  • 3
  • 18
  • 44
  • Why did you tag as 'linux'? – Axel Oct 29 '15 at 14:37
  • The error is at link time, that means it compiles fine. However, WinMain is not declared. On Windows, the standard entry point is `WinMain`, not `main`. I'm sure there's a linker flag you have to set, but I don't know which. – Axel Oct 29 '15 at 14:39
  • Possible duplicate of [undefined reference to \`WinMain@16'](http://stackoverflow.com/questions/5259714/undefined-reference-to-winmain16) – Mike Kinghan Oct 30 '15 at 08:07
  • Does your program have a WinMain (or main())? – XTL Nov 12 '15 at 19:53

0 Answers0