I am wondering why this code won't compiler properly.
Code:
// Windows programming.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
MessageBox(NULL, "Hello world!", "Sample", MB_OK);
return 0;
}
These are the errors I get.
--------------------Configuration: Windows programming - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Windows programming.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Windows programming.exe - 2 error(s), 0 warning(s)
I undefined _CONSOLE like the tutorial said to, but I still get those errors.
I am using MCVC++.