first win32 program(Help)
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.
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
Sand Hawk
----------------
-Earth is 98% full. Please delete anybody you can.
My Site
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\
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement