Sign in to follow this  

some stupid mistake by stupid me

This topic is 4726 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'm trying to compile some code, and i have this at beggining: #include <windows.h> #include <stdio.h> #include <dinput.h> #include "resource.h" IDirectInput8 *g_pDI; // DirectInput component IDirectInputDevice8 *g_pDIDevice; // Keyboard device (...) and while trying to compile it gives me 'syntax error: missing ; before *' and so on. dx fails to initialise. I'm using VC++ 6.0. I've included (dxsdkdir)/include in include options, same for (dxsdkdir)/lib. I've included dxguid.lib and dinput8.lib in project settings/library modules. I really have no idea what am i forgetting. will you help poor n00b? ;)

Share this post


Link to post
Share on other sites
Assuming you have the DirectX 8.x or 9.x SDK installed...


Quote:
I've included (dxsdkdir)/include in include options, same for (dxsdkdir)/lib


You also need to move those paths to the *top* of the lists.

MSVC 6 searches the paths in Tools->Options->Directories... in sequential order, so if the paths for the DirectX SDK are not at the top of those lists, then it will find the "dinput.h" file from the old Windows 98 beta Platform SDK which comes with MSVC 6 which only contains headers for DirectX 5.


Also, *before* you #include the "dinput.h" file, you should do a:

#define DIRECTINPUT_VERSION 0x0800

so that the correct version of the interfaces and structures is exposed.

Share this post


Link to post
Share on other sites
ooh... another problem:

error: directplay8create: unideclared identifier.

I'm trying to learn from pre-made code. i've looked up the file in 'dplay8.h', and found this section:

'/*
* This function is no longer supported. It is recommended that CoCreateInstance be used to create
* DirectPlay8 objects.
*
* extern HRESULT WINAPI DirectPlay8Create( const CLSID * pcIID, void **ppvInterface, IUnknown *pUnknown );
*
*/'

the same for directplay8addresscreate

help again, pretty please?

--------------------

update:
and i have already found answer to that. on gamedev forums, too ;)
sorry for being such whine ass ;P

[Edited by - EliteWarriorManTis on January 2, 2005 2:27:15 PM]

Share this post


Link to post
Share on other sites

This topic is 4726 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this