Advertisement

Can´t compile Lesson 23

Started by October 24, 2001 08:46 PM
3 comments, last by nicosio 23 years, 4 months ago
Hi: I can´t compile Lesson 23. I have DirectX 8 SDK. I already have checked the LINK settings and the dirs where the Libs and includes are. Does anyone know how to modify Lesson 23 to work with DirectX 8? Thank you, Nicosio I get the following build log: Build Log --------------------Configuration: lesson23 - Win32 Debug-------------------- Command Lines Creating temporary file "C:\WINDOWS\TEMP\RSP7381.TMP" with contents [ /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/lesson23.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\OpenGL_info\Lesson23\Lesson23.cpp" ] Creating command line "cl.exe @C:\WINDOWS\TEMP\RSP7381.TMP" Creating temporary file "C:\WINDOWS\TEMP\RSP7382.TMP" with contents [ winmm.lib dxguid.lib dinput.lib opengl32.lib glu32.lib glaux.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/lesson23.pdb" /debug /machine:I386 /out:"Debug/lesson23.exe" /pdbtype:sept .\Debug\Lesson23.obj ] Creating command line "link.exe @C:\WINDOWS\TEMP\RSP7382.TMP" Output Window Compiling... Lesson23.cpp C:\OpenGL_info\Lesson23\Lesson23.cpp(543) : error C2065: ''DirectInputCreateEx'' : undeclared identifier Error executing cl.exe. Results lesson23.exe - 1 error(s), 0 warning(s)
Have you updated your compiler files, namely dinput.h and dinput.lib.

Theres a link on the tutorial for you to download the updated header files for your compiler. You may have Direct X 8 installed on your system however your compiler will only use the Direct X SDK it was shipped with which is Direct X 5 if you have Visual C++ 6.

Download the headers and libs files for DX7 located on the tutorial page and install them into your compiler and everything should work okay.
Advertisement
I also have the DX8 SDK installed on my pc, however I can compile lesson 23 with no problem. How? Well, if you read the docs, you will see that you can define the header''s version. What I mean is, instead of using ver 8 of (say) dinput, you can define it as ver 7. You will then be able to use the header as if it was ver 7, but please notice that you cannot then use the ver 8 stuff. (thats the compromise you have to make). I have only done this once, so I will try to remember out of my head how to do it. So if I gave here is not correct, I will send the correct #define for you tomorrow. Ok?

Here''s what to do: Before you #define dinput.h, define the following: #define DINPUTVERSION 0x7000
It should work (i hope). As I said, if the above doesnt work, (i will check this when i go to home now), i will come back tomorrow and give you the correct #define.

Hope it works!

SimonSays
Hi

Well, it seems that my #define was wrong all the time. Just got the correct one. Use this: #define DIRECTINPUT_VERSION 0x0700

Should work now!

Bye
SimonSays

Ah yes, we''ve got two posts for the same question...

In regards to uninstalling DirectX and then reinstalling it, would one have to go through and delete each .h file? Interestingly M$ says:

Q. How do I uninstall DirectX?

A. DirectX 8.0a is a system component and cannot be uninstalled. If there is a problem with the DirectX install, it can normally be resolved by shutting down all running applications and reinstalling. As mentioned previously, DirectX 8.0a is fully backward-compatible with titles written for previous versions of DirectX. If you are having other problems after installing DirectX 8, these can often be resolved by installing updated drivers for your display card, audio card, or input device.


Any comments?
-jay

This topic is closed to new replies.

Advertisement