0

I am creating a basic code, as I just insalled the required extensions on VScode in order to code in C/C++. I created a basic hello world program but instead of creating a output the following message is being prompted:

undefined reference to `WinMain@16'collect2.exe: error: ld returned 1 exit status

Any way to fix this, so that I can code?

I've tried re-naming the code project, deleting the file and then creating a new one but both don't seem to have a affect. I am looking for a way to fix this so I can code.

Mr.Brown
  • 1
  • 1
  • You need to tell the compiler that you want a console program. Instead you are asking for a 16 bit windows program. What compiler are you using that can output a 16 bit windows program? I think you probably need a newer compiler - anything that old won't be a good thing to use. – Jerry Jeremiah Jun 28 '23 at 02:03
  • 1
    Does this answer your question? [Undefined reference to WinMain@16 - Codeblocks](https://stackoverflow.com/questions/29404780/undefined-reference-to-winmain16-codeblocks) – the busybee Jun 28 '23 at 05:38
  • 1
    Welcome to StackOverflow. This issue was asked a lot and answered many times. Please check the linked question and read at least a few of the others you will find by using the search term `"WinMain@16"` - note the quotation marks. – the busybee Jun 28 '23 at 05:40

0 Answers0