// JP opened flex table

Click to See Complete Forum and Search --> : Some strange errors with DirektX8


catmad
October 1st, 2001, 03:34 AM
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

Bornish
October 29th, 2004, 12:27 PM
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,

Ejaz
October 29th, 2004, 12:51 PM
Is it possible that you zip the sample code and upload it?

Bornish
October 29th, 2004, 01:03 PM
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,

Ejaz
October 29th, 2004, 01:19 PM
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.

Bornish
October 30th, 2004, 02:04 AM
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,

Ejaz
October 30th, 2004, 02:36 AM
My pleasure :D & welcome to DirectX :thumb:

Andreas Masur
October 30th, 2004, 11:31 AM
[ Moved thread ]

//JP added flex table