mattholomew
Programmer
Hi. I'm doing some windows game programming, but I just switched over from Borland C++ 4.5 to Visual C++ 4.0. With this new compiler, it is not accepting WinMain, apparently. This is the main() function for windows. If anyone could tell me why, I would appreciate it. The specific error is 'unresolved external symbol _main.' It is a linking error. Now, the borland compiler book has a list of errors in the back. This one does not. What's up with that? It sure would be helpful, seeing as I don't know an unresolved external symbol error from A DEAD MUPPET. Yes, it's that bad. Here is my little windows program:
// PROG3_2.CPP - A simple message box
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
// main entry point for all windows programs
int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
// call message box api
MessageBox(NULL, "What's up world!",
"My First Windows Program",MB_OK);
// exit program
return(0);
} // end WinMain
I'd appreciate some help, thanks a lot!
Mattholomew
[sig][/sig]
// PROG3_2.CPP - A simple message box
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
// main entry point for all windows programs
int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
// call message box api
MessageBox(NULL, "What's up world!",
"My First Windows Program",MB_OK);
// exit program
return(0);
} // end WinMain
I'd appreciate some help, thanks a lot!
Mattholomew
[sig][/sig]