• Advertisement

Archived

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

DX8 + DInput + Backward compatible???

This topic is 6220 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I recently installed the DX8 sdk, now my apps with Dinput code will not compile, This is the Error "error C2065: ''DirectInputCreate'' : undeclared identifier" I had a look in the dinput.h file and found the following comment /* * To build applications for older versions of DirectInput * * #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ] * * before #include . By default, #include * will produce a DirectX 8-compatible header file. * */ I gave this a try, like so #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ] #include "dinput.h" but I got the following compile error, has anyone any Idea whats going on "c:\mssdk\include\dinput.h(145) : fatal error C1017: invalid integer constant expression" I have my Dinput objects defined as follows //********************************************* //********* DINPUT **************************** // DirectInput Objects LPDIRECTINPUT lpDI; LPDIRECTINPUTDEVICE lpDIDKeyboard; LPDIRECTINPUTDEVICE lpDIDMouse;

Share this post


Link to post
Share on other sites
Advertisement
er... it means to use one of those numbers, (the version you want to use) not the whole thing.

#define DIRECTINPUT_VERSION 0x0500

''''A bird in hand is safer than one overhead''''

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think youshould just replace

#define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ]

by

#define DIRECTINPUT_VERSION 0x0300
or
#define DIRECTINPUT_VERSION 0x0500
or
#define DIRECTINPUT_VERSION 0x0700

depending on the version of DX you want

cu
belette/wipe
www.wipe-fr.org

Share this post


Link to post
Share on other sites
Ahem, what the header means is:
If you want DirectInput version one:

#define DIRECTINPUT_VERSION 0x0300
#include <dinput.h>

if you want DirectInput version two:

#define DIRECTINPUT_VERSION 0x0500
#include <dinput.h>

if you want DirectInput version 7:

#define DIRECTINPUT_VERSION 0x0700
#include <dinput.h>


Rather than defining [ 0x0300 | 0x0500 | 0x0700 ].

Whoops! It's already been said three times.


Just because you're outnumbered doesn't mean you're wrong.


sharewaregames.20m.com

Edited by - furby100 on February 12, 2001 1:38:58 PM

Share this post


Link to post
Share on other sites

  • Advertisement