0

In eclipse I am trying to build a C project and after building it I get this error:

undefined reference to 'WinMain@16'

though I did install mingw compiler and add its path to the environment variables.
I tried to delete it and install the mingw compiler again, but nothing happens.

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
  • ok thank you. Sorry for that – Nour Ashraf Jul 08 '23 at 01:04
  • Did you successfully build and run a HelloWorld for commandline (i.e. no windows or other advanced stuff) and without anything but the compiler (i.e. no IDE, not Eclipse, ....)? Because the error message does not read like a problem with finding the compiler.... – Yunnosch Jul 08 '23 at 07:46
  • Can you confirm that the following is correct? "while trying to build" instead of "after building", "the unwanted behaviour did not change" instead of "nothing happens". These things would slightly change the meaning of what you describe, so I did not edit it without asking. – Yunnosch Jul 08 '23 at 07:51
  • Using my favorite search engine just on the error message you quoted gets me many hits. Among others https://stackoverflow.com/questions/5259714/undefined-reference-to-winmain16 Please explain why that Q/A, especially the most upvoted and very detailed answer, does not help you. You did use a search engine before posting this question, didn't you? – Yunnosch Jul 08 '23 at 07:55
  • while trying to build it is my bad sorry for that and it gives me the this error – Nour Ashraf Jul 08 '23 at 13:45
  • I try to run a helloworld for cmd and it also give me the same error – Nour Ashraf Jul 08 '23 at 13:47
  • I saw this https://stackoverflow.com/questions/5259714/undefined-reference-to-winmain16 question but i did not understand anything – Nour Ashraf Jul 08 '23 at 13:51

0 Answers0