dinput prob...

Started by
2 comments, last by neonoblivion 21 years, 6 months ago
what files should I include in a project to get dinput working? it keeps telling me that it doesn't know what DirectInputCreate is ... --------------------Configuration: game - Win32 Debug-------------------- Compiling... functions.cpp c:\dxsdk\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 level.cpp c:\game\functions.h(24) : error C2146: syntax error : missing ';' before identifier 'lpdi' c:\game\functions.h(24) : fatal error C1004: unexpected end of file found main.cpp c:\dxsdk\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 c:\game\main.cpp(340) : error C2065: 'DirectInputCreate' : undeclared identifier Error executing cl.exe. Creating browse info file... BSCMAKE: error BK1506 : cannot open file '.\Debug\level.sbr': No such file or directory Error executing bscmake.exe. game.exe - 4 error(s), 0 warning(s) what should I do ? Klaus [edited by - neonoblivion on October 23, 2002 5:38:15 AM]
Advertisement
do you have INITGUID defined before header file inclusion?
<a href="http://www.purplenose.com>purplenose.com
Because you haven''t defined DIRECTINPUT_VERSION and are compiling against the DirectX8 SDK, the compiler assumes you are using direct input 8. That means that it declares DirectInputCreate8 rather than DirectInputCreate.

If you want to use DI8 just use the new name, otherwise put #define DIRECTINPUT_VERSION 0x0700 (or whatever) before any #include "dinput.h" lines.
Thanx I''ll try those.

This topic is closed to new replies.

Advertisement