int My_Direct_Input (void)
{
FILE *fp = fopen ("initialize_report.txt", "a");
if (!(DirectInput8Create (hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void **) &m_pDirectInput, NULL)))
{
fprintf (fp, "\n\nDirectInput initialization: FAILED");
Direct_flag = 0;
}
else
{
(insert initialization code here)
}
}
DirectInput error
I'm getting an error while trying to create a DirectInput object. This is the code:
The error I'm getting is:
'DirectInput8Create' undefined; assuming extern returning int
and also
'IID_IDirectInput8' undefined; assuming extern returning int
I have dinput.h included and I have dinput.lib in my project settings (I'm using MSVC++ ver 6.0).
Does anyone know why I'm getting this?
mw
What SDK version are you using?
VisualStudio 6 is no longer supported by recent versions of DX 9.
Also if my memory doesn`t fail me you should link to 'dxguid.lib' too.
VisualStudio 6 is no longer supported by recent versions of DX 9.
Also if my memory doesn`t fail me you should link to 'dxguid.lib' too.
I checked this site:
http://support.microsoft.com/gp/lifeobsoleteproducts
But it didn't list MSVC++ ver 6.0 as obsolete yet. Could it be something else? I'm using the latest version of DirectX.
mw
http://support.microsoft.com/gp/lifeobsoleteproducts
But it didn't list MSVC++ ver 6.0 as obsolete yet. Could it be something else? I'm using the latest version of DirectX.
mw
Quote:Original post by Lionmane
I checked this site:
http://support.microsoft.com/gp/lifeobsoleteproducts
But it didn't list MSVC++ ver 6.0 as obsolete yet. Could it be something else? I'm using the latest version of DirectX.
mw
The page you link to is about technical support, from Microsoft. Visual C++ 6.0 is NOT supported by any SDKs since December 2004. The last supporting SDK is the October 2004 SDK with the extras package. This information is mentioned in the Forum FAQ.
Ok, now I'm using MSVC++ ver 6.0 with service pack 6.
I'm using DirectX 9.0 (October 2004 release).
I'm still getting errors when attempting to compile... :-(
Here is the code that contains all of the errors:
The errors I'm getting are:
01) 'function': incompatible types
02) 'DirectInput8Create': different types for formal and actual parameter 3 (this is a warning)
mw
I'm using DirectX 9.0 (October 2004 release).
I'm still getting errors when attempting to compile... :-(
Here is the code that contains all of the errors:
int My_Direct_Input (void){ FILE *fp = fopen ("initialize_report.txt", "a"); if (DirectInput8Create (hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void **) &m_pDirectInput, NULL)) { fprintf (fp, "\n\nDirectInput initialization: SUCCESS"); Direct_flag = 0; } else { fprintf (fp, "\n\nDirectInput initialization: FAILED"); Direct_flag = 1; }}
The errors I'm getting are:
01) 'function': incompatible types
02) 'DirectInput8Create': different types for formal and actual parameter 3 (this is a warning)
mw
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement