Advertisement

first win32 program(Help)

Started by December 19, 2002 03:48 AM
3 comments, last by Buzz1982 21 years, 11 months ago
hi, this is my first win32 program. i m using visual c++ 6 and getting the following error please help. #include #define WIN32_LEAN_AND_MEAN int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd) { MessageBox(NULL,TEXT("Hello World!"),TEXT("My First Windows Application"),NULL); return 0; } the error is, --------------------Configuration: window - Win32 Debug-------------------- Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/window.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. window.exe - 2 error(s), 0 warning(s)
You created a Win32 Console Application. That means it wants a main function, not a WinMain.. what you wanna create is the application above it, a Win32 Application or whatever its called... (can''t remember right now). You should be ok from there.
Advertisement
You are making a Win32 console project. Create a new project, and choose Win32 application instead of win32 console.

Sand Hawk

----------------
-Earth is 98% full. Please delete anybody you can.


My Site
----------------(Inspired by Pouya)
oh, what a simple stupid mistake,
I was doing the exact same thing, beating my head against the wall trying to figure out what I was doing wrong,
I HATE MFC 8\
Bobboau, bringing you products that work... in theory
Easy mistake to make! And as far as I am aware that isn''t even MFC yet...

This topic is closed to new replies.

Advertisement