Advertisement

Link Errors

Started by January 14, 2001 06:09 PM
3 comments, last by doodah2001 24 years ago
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
MatDoodah2001@hotmail.comLife is only as fun as you make it!!!
Win32 apps require a WinMain() function, instead of the normal main() function.

==================
/* todo: insert cool sig */
Martee
Magnum Games.NET
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Advertisement
I''m now getting a compiler error. It''s telling me the WinMain() function is overloaded, which it''s not.
MatDoodah2001@hotmail.comLife is only as fun as you make it!!!
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
I got it fixed now. My brain just wasn''t working like it''s supposed too.
MatDoodah2001@hotmail.comLife is only as fun as you make it!!!

This topic is closed to new replies.

Advertisement