Some strange errors with DirektX8
Hello!
I got some strange errors everytime when I try to compile the sample code from the direktx8 sdk for mouse-input!
DirektX SDK and drivers are installed!
I got allready all Headers and Libs and Dlls, but this error messages appears everytime:
: missing 'token' before identifier g_pDI
: missing storage-class or type specifiers
: unexpected end of file found
The source-code: (from mouse.cpp [SDK])
LPDIRECTINPUT8 g_pDI = NULL;
LPDIRECTINPUTDEVICE8 g_pMouse = NULL;
thanks in advance for help!
bye
catmad@gmx.net
[635 byte] By [
catmad] at [2007-11-17 4:42:37]

# 1 Re: Some strange errors with DirektX8
Unfortunatelly (for me) I have the same problem. :confused:
Have to add support for some auxiliary input, using DirectInput, and this sample code I have doesn't compile. MSDN tells me that "LPDIRECTINPUT8" is defined in dinput.h, but including it makes no difference! :mad:
How did you fixed your problem?
Thanks,
# 3 Re: Some strange errors with DirektX8
Please find the attached sample project.
Check "joystick.plg" to see my compilation errors.
I've searched in "dinput.h" and found declarations for LPDIRECTINPUT & LPDIRECTINPUT2, not LPDIRECTINPUT8. Trying both gave me other compilation errors and makes me guess that I'm not on the right track.
Thanks,
# 4 Re: Some strange errors with DirektX8
Dear Bornish,
I tried your code and it complied and linked successfully. I don't have any joystick right now, so I can't go much far with it. I've DX9 at my machine.
Try this, in your Tools->Options->Directories tab, make sure that the entires for the DirectX SDK are at the top (like C:\DXSDK\Include, for include files...C:\DXSDK\Lib, for lib files) and then recompile the project.
Ejaz at 2007-11-10 3:55:25 >

# 5 Re: Some strange errors with DirektX8
Hi Ejaz!
Thanks to your hint to check my include & lib folders, I have fixed my problem: my computer has multiple versions of SDK installed, and the path to the old version (not supporting LPDIRECTINPUT8) was above the never one, thus my sample project was linking to the wrong one.
Sometimes we need a new pair of eyes to catch obvious mistakes. Thanks for helping out.
Best regards,