0

I searched it up and it has been asked a bilion times for many different situations. But mine is simply one: i try to compile a simple EMPTY file and i get this error:

Error 1 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

There are people saying that is about the difference of the subsystem between console and windows, but i tried both, in both win32 console application and in console application but the error is the same, with some or without any code in the source file. I repeat, the file is empty and i get this error. Can somebody help me to fix this?

pnuts
  • 58,317
  • 11
  • 87
  • 139

1 Answers1

0

A C++ program must define main. If all you have is an empty file then you obviously haven't done that.

What were you expecting it to do?

Alan Stokes
  • 18,815
  • 3
  • 45
  • 64
  • As i said i tried even like that but the error still occours. It happened a 2 hours ago when i used a int vec[2] and i got this error and now i can't fix it in any way, shape or form and damn i'm so stucked now. – Nicola36631 Oct 25 '15 at 15:46
  • @Nicola36631 if the code linked, and after a modification it didn't, odds are good that the modification somehow hid main. Maybe the brackets were gooned. Can't say. Post code. – user4581301 Oct 25 '15 at 16:18