July 14, 200421 yr Commercial Member Hi,I'm creating this gauge for my freeware panel which needs to read keyboard input directly into the gauge. In the great Dragonflight manual I found the cpp and h files and some instructions on how to set up the gauge, but when I compile in VC++6 I get compiler errors about LDIRECTINPUT not being properly declared or something.This question has been asked before in 2003 I think but I couldn't find the answer only that the user was able to fix the problem...Anybody here able to help me out ? Thx,Bj Bj
July 14, 200421 yr You need some header files form the directx sdk, at least the "dinput.h". If you have the files already you'll probably need to add or shift the include/library directories under "extras->Directories" so the DirectX includes/libraries are higher then the default include paths.Arne Bartels
July 14, 200421 yr Author Commercial Member Hi Arne,I'm not really sure what you mean with your answer. I shifted around the position of the header files in the c-codes and the errors during the compilation have gone but ow I get errors during the linking:"Linking... Creating library Release/BC_A300_FDATA.lib and object Release/BC_A300_FDATA.expBC_A300_FDATA.obj : error LNK2001: unresolved external symbol _FreeDirectInputBC_A300_FDATA.obj : error LNK2001: unresolved external symbol _CreatDirectInputDeviceBC_A300_FDATA.obj : error LNK2001: unresolved external symbol _GetFSWindowHandleRelease/BC_A300_FDATA.gau : fatal error LNK1120: 3 unresolved externalsError executing link.exe."I have included the necesarry lib files and dinput.h file etc... so everything should be in place. Does this ring any bells, can I maybe send you my source files so can have a look ?Thx for the help,Bj Bj
July 14, 200421 yr Did you add the "DInputKeyboard.cpp" to the project? It has to be compiled as a seperate module and then linked to the project. The simplest way is: open the gauge project, then open DInputKeyboard.cpp, then right click and chose "Add to project...".Arne Bartels
July 15, 200421 yr Author Commercial Member Arne,The module is included in the project. I removed and put it back again the way you said but that gives the same result. Edit: 09:05 same day...Found it ! The DKeyboardInput.cpp file had the DKeyboardInput.h commented out... hadn't really noticed that. Now it works perfectly ! Thx again Arne for the support.Bj Bj
May 13, 200521 yr sd2gau17.zip on flightsim.com is Dai Griffiths tutorial. "DInputKeyboard.*" are part of this as sample code.Arne Bartels
Create an account or sign in to comment