Archived

This topic is now archived and is closed to further replies.

Linker error 2001

This topic is 5899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites