• Advertisement

Archived

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

Linking errors, help the newbie!

This topic is 6589 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 get the following error when I compile a simple project. I am using MSVC++6 and things are not going well for me, becayse I can''t even compile... This is really getting me down because I can''t make games!--------------------Configuration: DXExample - Win32 Debug-------------------- Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/DXExample.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. DXExample.exe - 2 error(s), 0 warning(s) Thanks for any help that anyone can provide... I have set everything up as I was instructed but I am obviously missing a .lib file (I think). Anton LaVey

Share this post


Link to post
Share on other sites
Advertisement
Have you got a WinMain? And if so make sure the prototype is exectly the following:

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)

If that dosn''t work - mail me your code and I''ll help you.

Good luck.

Share this post


Link to post
Share on other sites
make sure if you are using namespaces, to put main in the global namespace
other than that, the other 2 said it all

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I had the same problem with links. I bought the DirectX book from Microsoft..and it says,"Under Options clikc on directory. Add the lib directory to the directory tab and make sure you set it to first priority by clicking the arrow to put it ahead of all the other directories."

After doing that it works fine with no errors. I can compile and everything.

hiryu3@hotmail.com

Share this post


Link to post
Share on other sites

  • Advertisement