Jump to content
  • Advertisement


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


Link Errors

This topic is 6539 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

Lately I've been getting some errors with linking. I can't for the life of me figure out why. It always involves whenever I use #include windows.h #include gl\gl.h #include conio.h #include gl\glaux.h void main(void) { //my code here } I get a linking error LNK2001:unresolved external symbol _WinMain@16 then a fatal error LNK1120: unresolved external symbols. whenever I've programmed using OpenGL before I haven't had this problem. Any ideas. Mat Edited by - doodah2001 on January 14, 2001 7:45:56 PM

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Have you declared the WinMain function correctly?
It should look something like this:

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, char * szCmdLine, int iShowCmd)
// you code here...


Look at the examples at MSDN

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!