A C++ dosprogrammer who's entering the beautiful world of windowsprogramming (I wanted more memory to my programs) :
I got Microsoft Visual C++, today and wanted to make the simpliest program in the world: Hello World!
So I wrote:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
MessageBox(NULL, "What's up world", "My First Windows Program",MB_OK);
return(0);
}
But the **** wouldn't work, I could compile it, but not build an "exe-file" of it!
It said:
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Hello.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Ok, probably a verry easy problem, but I'm a newbie in
Visual C++6, and my world would be a lot easier if someone could help me!
Rock on!