🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Linking errors, help the newbie!

Started by
3 comments, last by Anton LaVey 24 years, 5 months ago
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
Advertisement
did you include window.h and windowsx.h?




C++ Rocks
Visit http://members.xoom.com/ivanickgames
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.
make sure if you are using namespaces, to put main in the global namespace
other than that, the other 2 said it all
-PoesRaven
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

This topic is closed to new replies.

Advertisement