🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Learning the window api

Started by
1 comment, last by Nothingness 22 years, 9 months ago
Well I just got the book "tricks of the windows game programming gurus" i just pretty much made the program with the message box appears. But 2 errors come up. They say unresolved external symbol _main 1 unresolved externals
      
#include <windows.h>

#include <windowsx.h>


int WINAPI WinMain(HINSTANCE hinstance,HINSTANCE hprevinstance,
                   LPSTR lpcmdline,int ncmdshow)

{


//message box

MessageBox(NULL,"HELLO","MESSAGE BOX", MB_OK | MB_ICONEXCLAMATION);

//exit program

 return 0;
}
      
This is the code by the way. I hope you can help. I dont want all my programs to have these errors. Edited by - Nothingness on September 26, 2001 8:59:07 PM Edited by - Nothingness on September 26, 2001 8:59:22 PM
Advertisement
Make sure that your project is a Win32 app, not a Win32 console app.

~~~~~~~~~~
Martee
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Ok that worked. Thanks!!!

This topic is closed to new replies.

Advertisement