Little DInput problem !!!
Hi guys!
Little question for a big problem. I am writting some wrapper classes and now i got a problem with direct input.
Its the typical linker problem "unresolved symbol".
Or beeing more excatly "error LNK2001: unresolved extern symbol: _IID_IDirectInput8A" !
I am quite sure that this symbol is solved in the "dxguid.lib". But this library (and of course dinput8.lib) are already included. The code itself is just little class for direct input (keyboard) but that is not important because there has to be a linker error... i get crazy about this.
Did i miss a library??? Or did i miss anything else???
Please help me :]
yup. IDD_IDirectInput8A/W do lead into dxguid.lib... and you do get that error if they arn''t included correctly.
I''m not sure, but DX7 may have used the same file name, are you sure that your dxguid.lib is A dx8 lib? (just a guess)
I''m not sure, but DX7 may have used the same file name, are you sure that your dxguid.lib is A dx8 lib? (just a guess)
i would be surprised if it would be so. i am using sdk 8.1 and there is the dinput8.lib
so cant imagine that i got the wrong version.
so cant imagine that i got the wrong version.
ah, btw.
if i remove this line, everything works fine (but of course i have no control because the device is not initialized):
hr = DirectInput8Create( hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&this->__pDInput, NULL );
Ok, so far its logical because this is the only time i use IID_DirectInput8. I looked it up in the dinput.h, there it is:
#define IID_DirectInput8 IID_DirectInput8A
IID_DirectInput8A is always defined there. so i cant imagin where this damn error is.
if i remove this line, everything works fine (but of course i have no control because the device is not initialized):
hr = DirectInput8Create( hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&this->__pDInput, NULL );
Ok, so far its logical because this is the only time i use IID_DirectInput8. I looked it up in the dinput.h, there it is:
#define IID_DirectInput8 IID_DirectInput8A
IID_DirectInput8A is always defined there. so i cant imagin where this damn error is.
wow, solved that ugly problem... bad error but for everyone who is interested in it or got the same problem:
you have to move the search path for includes and libs at top of all ( the entry of the DXSDK path ). i was sure that i did it, but it wasnt like this.
bad error, but for everyone with the same problem a little hint
you have to move the search path for includes and libs at top of all ( the entry of the DXSDK path ). i was sure that i did it, but it wasnt like this.
bad error, but for everyone with the same problem a little hint

yah. sounds like what I thought... using an older version of dxguid.lib (note there is no 8 in the name)...
the macro in dinput.h is actually another macro, which goes off to a guid macro..
the macro in dinput.h is actually another macro, which goes off to a guid macro..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement