0

enter image description here

not getting output on terminal

c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status PS C:\Users\pmalh\Desktop\c++> .a.exe .a.exe : The module '.a' could not be loaded. For more information, run 'Import-Module .a'. At line:1 char:1 + .a.exe + ~~~~~~~ + CategoryInfo : ObjectNotFound: (.a.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoLoadModule

  • .a.exe is not a valid file name. There is something wrong in your makefile, or link command line, which we cannot see. – Michaël Roy Oct 13 '21 at 02:21
  • The exact same file was working using the exact same commands few days ago when you asked the a very similar question at https://stackoverflow.com/questions/69477058/tutorial-from-code-with-harry-a-youtube-channel . What have you changed(in your system) since then? – Jason Oct 13 '21 at 03:08
  • nothing ..really a newbie in coding...shoud i just skip visual code and practice on online compiler?? – Ashish Malhotra Oct 13 '21 at 05:00
  • The white dot in your tab tells me you have not saved yet. You should explicitly save before trying to compile your file, as presumably your compiler sees a file without a `main` function. – Botje Oct 13 '21 at 07:00
  • Does this answer your question? https://stackoverflow.com/questions/20909816/undefined-reference-to-winmain16 – n. m. could be an AI Oct 14 '21 at 15:34

0 Answers0