-
WinMain? main?
hi,
i tried to use WinMain instead of main in my program but an error on linking. the error message shown below:
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/DialogBox.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
please advice. thanks
thanatos
-
Do you have your callback?
-
show some code then it will be easier to help
-
code
hi
here is the code of WinMain
int PASCAL WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd)
{
memset(&globe,0,sizeof(globe));
globe.winapp=hInstance;
if(CreateTheDialogBox()<0) {
return -1;
}
return 0;
}
besides, i don't understand what is "callback". i'm new in C. :(
thanks
thanatos
-
Look at what type of app you are creating.
Looks like you have not created a WIN32 app, so it is looking for the usual main().
-
i got you novacain. i created a win32 console application instead of win32 application.
thanks everybody.
thanatos