Archived

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

EkEk

error in direct input 8

Recommended Posts

hi everyone, i'm sorry if my question seems silly! but i'm really new beginner in programming. this is about directplay 8 that i try to write, when i try to compile, it went error like this: error C2065: 'DirectInput8Create' : undeclared identifier but when i change to DirectInputCreate the error is gone. i have installed directx 8.1 SDK and when I open the header file/dinput.h I found DirectInput8Create in there. This is really confusing, why the compiler doesn't recognize it?? can anyone help me? i've have add the header file (dinput.h)! i'm facing the same problem with direct play 8 either. [edited by - EkEk on October 23, 2003 7:33:01 AM]

Share this post


Link to post
Share on other sites
1) Go to Tools->Options in the MSVC IDE and click on the Directories tab

2) Select "Include Files" under "Show Directories For"

3) Add the path to the include folder of the DirectX SDK to that list. For example "C:\DXSDK\Include"

4) Move that path to the *TOP* of the list of paths. This step is very important.

5) Repeat the above steps for Library files, their folder in the SDK is "DXSDK\Lib"

--
Simon O''Connor
3D Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites
quote:
Original post by Pipo DeClown
Because *if* you had some files of the SDK already in your directories, the compiler will use that one. So if you put the NEW directory on top, it will search there for the file first.

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..


Yep.

MSVC 6 comes with the header files for DirectX 7 so the paths it sets up by default only include DX7 interfaces/functions. If you need DX8 functions/interfaces then you need MSVC to find the DX8 files before it finds the DX7 ones.

Share this post


Link to post
Share on other sites