Advertisement

KC_SetMouse/SetKey error

Started by February 13, 2004 01:45 PM
0 comments, last by CampbellBelden 21 years ago
I was looking at the code from Article #14 and I was trying to merge my version of OpenGL Lesson10 with the mousemoving function(where the camera looks where you move your mouse). I added the relevant parts of Article #14 to my edited classwork and when I compile it, I get an "unresolved external symbol" error. Here are my errors: lesson10.obj : error LNK2001: unresolved external symbol "void __cdecl KC_SetKey(int,void (__cdecl*)(int,int))" (?KC_SetKey@@YAXHP6AXHH@Z@Z) lesson10.obj : error LNK2001: unresolved external symbol "void __cdecl KC_SetMouse(int,void (__cdecl*)(int,int))" (?KC_SetMouse@@YAXHP6AXHH@Z@Z) Debug/lesson10.exe : fatal error LNK1120: 2 unresolved externals I #included the kbdctrl.h just like it says in the article, but I'm still getting the errors. Any help is _greatly_ appreciated. And I can post any of the code if needed. Thanks. - Campbell` [edited by - CampbellBelden on February 13, 2004 2:45:39 PM] [edited by - CampbellBelden on February 13, 2004 2:46:26 PM]
Well, you must add the kbdctrl.cpp file to your project, else there will be no function definention for the kbdctrl functions, only a declaration, which gives the unresolved external symbol error. And, make sure that kbdctrl.cpp includes (it probably will already include) kbdctrl.h , else it will probably still give the error.

This topic is closed to new replies.

Advertisement