Archived

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

Leviathan569

Problems with DirectInput... Again!

Recommended Posts

Leviathan569    122
Okay, here I am again with another DirectInput problem. This should be the easiest part of DirectX but it already caused me more headaches than any other part. Okay, here we go. I finally succeeded in initialising DirectInput and creating a keyboard device. But when I try to set the data format, I get this linker error : [Linker Error] Unresolved external ''_c_dfDIKeyboard'' referenced from C:\...\DIRECTINPUT.OBJ This is the code that causes the problem : if (Keyboard->SetDataFormat(&c_dfDIKeyboard) != DI_OK) return false; The most obvious cause of this problem would be that I forgot to link in a library. I linked dinput.lib and dxguid.lib, like my DirectX manual said. Nothing, still the same problem. I checked out a lot of tutorials and I don''t seem to do anything wrong. Is it possible that it doesn''t work because I use Borland C++ Builder? Every manual and tutorial assumes you use Visual C++. If anybody has working BCB code I would like to see it. ------------------------ leviathan569@hotmail.com ------------------------

Share this post


Link to post
Share on other sites
Zeke    122
Now this probably isnt the problem but just in case ill tell you. I had errors similar to this when i was doing my direct input class. the header for my direct input class was the same filename as the direct x header file (i.e. dinput.h). Yes i know it was stupid but it never ocurred to me that they were the same and it took me a few hours to realise what the problem was. The reason I suggest this might be the case was because your reasoning is the same as mine was (ive included everything that I need to why isnt it working?).

Like i say its not likely this is the problem (i doubt you are as dopey as i lol) but just in case...

Share this post


Link to post
Share on other sites