Archived

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

bobster

included resources problem

Recommended Posts

Hi, I''ve been working on a simple platformer for about 4 weeks using visual c++, and have recently transfered the project to another machine. However, despite having not changed any of the code it is throwing up the two following compile errors: error C2065: ''DirectInput8Create'' : undeclared identifier error C2065: ''IID_IDirectInput8'' : undeclared identifier However, I have ensured that on the new machine I have included the DX include and lib paths in the directories tab of the tools...options dialog box. The Link Project Options for the project are as follows: dxguid.lib dinput8.lib d3dx9dt.lib d3d9.lib d3dxof.lib comctl32.lib winmm.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /subsystem:windows /incremental:yes /pdb:".\Debug/billboard.pdb" /debug /machine:I386 /out:".\Debug/billboard.exe" /libpath:"..\..\framework\lib" /ignore:4089 /ignore:4078 I have also noticed that on the new machine, that the DX sample files from the SDK will not compile, when of course they should. The error is similar, to do with the typedefs. for instance the billboard sample gives: error C2065: ''ULongToHandle'' : undeclared identifier and also error C2065: ''ULongToPtr'' : undeclared identifier which leads me to believe that these problems are being caused by something more fundamental. I have tried in the platformer project changing the #include command to include a different file than dinput.h, for instance dinpu.h, but this gives an error that the file could not be found, implying that with the correct filename it is location the header file for the DirectInput8Create function. I really don''t understand what is causing this problem, can anyone tell me why the function is not being recognised?

Share this post


Link to post
Share on other sites
yeah course otherwise i wouldnt have been able to add the DX include and lib paths, and also dinput.h would not have been found. I''m have a feeling the problem is to do with more fundamental header files whose absence are causing these errors as a side effect, as it seems less than a coincidence that it the compiler is throwing up ''undeclared identifier'' at the standard windows typedefs like ULongToPtr.

Share this post


Link to post
Share on other sites
There might be old DirectX headers in your default MSVC include directory. Make sure you include your DirectX headers before these! Either copy the headerfiles to the default MSVC include directory(C:\program\Microsoft Visual Studio\VC98\include or wherever you have installed MSVC) or look under "Tools|Options|Directories|Include files".

Here make sure the path to "c:\dx9sdk\" (or where you installed the sdk) is somewhere above "C:\program\Microsoft Visual Studio\VC98\include" to be sure you include the correct version of the header files.

Do this with the lib files too I suppose.

[edited by - en dum en on August 9, 2003 5:42:59 PM]

Share this post


Link to post
Share on other sites