Skip to main content
gamedev.net
🔒 Locked

Linker error 2001

Started by a_insomniac Oct 20, 2001 at 11:29 AM 3 replies 750+ views
Original Post
a_insomniac
a_insomniac
I am linking to the proper libs in the project settings and I have included the headers I need... Can some take a look and see what I may be over looking....thanks.. ## Linker Error LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/3.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Morph
----------
 
SPAR
SPAR
Post your main function here
a_insomniac
a_insomniac
Ok here ya are

    int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
//intialize the application, exit on failure


if(!Init(hinstance,ncmdshow)){
Cleanup();
return FALSE;
}

//run till completed


MSG msg;
while (GetMessage(&msg,NULL,0,0)){
//dispatch the message


TranslateMessage(&msg);
DispatchMessage(&msg);
}

//return final message

return (msg.wParam );
}


Edited by - a_insomniac on October 20, 2001 1:49:20 PM
----------
 
lacsap
lacsap
Check your projects settings. It seems to me that you chose a console application instead of a windows application (console uses main(), windows-app uses WinMain() )

lacsap
a_insomniac
a_insomniac
lacsap

Thanks, dunno how I missed that...but that was it.

----------
 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.