w_briggs
asked on
DirectX, Visual 6.0: unresolved external symbol _IID_IDirectInput8A
I'm getting the link error "unresolved external symbol _IID_IDirectInput8A" .
There's are two .cpp files. Each starts like this:
#define WIN32_LEAN_AND_MEAN // get rid of Windows things we don't need
#include <windows.h> // included in all Windows apps
#include <winuser.h> // Windows constants
#include <gl/gl.h> // OpenGL include
#include <gl/glu.h> // OpenGL utilty library
The InputSystem.h file starts thus:
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <objbase.h>
#define INITGUID
#include <initguid.h>
I'm using Visual C++ 6.0. The first include directory is the Direct X 9.0 SDK/Include; so it's not getting the old 6.0 dinput.h. The DirectX 9.0 library doesn't come first, because if I move it to the head of the lists, I get this link error: fatal error LNK1103: debugging information corrupt; recompile module
There is another thread on this, at https://www.experts-exchange.com/questions/20796313/DirectInput-sample-code-won't-link-in-C-is-missing-IID-IDirectInput8A.html?query=_IID_IDirectInput8A&clearTAFilter=true . There's a suggestion there of moving the DirectX library to the head of the list. I'm not sure why that isn't working for me.
Thanks --
Will Briggs
Lynchburg College
There's are two .cpp files. Each starts like this:
#define WIN32_LEAN_AND_MEAN // get rid of Windows things we don't need
#include <windows.h> // included in all Windows apps
#include <winuser.h> // Windows constants
#include <gl/gl.h> // OpenGL include
#include <gl/glu.h> // OpenGL utilty library
The InputSystem.h file starts thus:
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <objbase.h>
#define INITGUID
#include <initguid.h>
I'm using Visual C++ 6.0. The first include directory is the Direct X 9.0 SDK/Include; so it's not getting the old 6.0 dinput.h. The DirectX 9.0 library doesn't come first, because if I move it to the head of the lists, I get this link error: fatal error LNK1103: debugging information corrupt; recompile module
There is another thread on this, at https://www.experts-exchange.com/questions/20796313/DirectInput-sample-code-won't-link-in-C-is-missing-IID-IDirectInput8A.html?query=_IID_IDirectInput8A&clearTAFilter=true . There's a suggestion there of moving the DirectX library to the head of the list. I'm not sure why that isn't working for me.
Thanks --
Will Briggs
Lynchburg College
Are you linking with 'dxguid.lib' also?
ASKER
Yes, I have dxguid.lib and dinput8.lib.
ASKER
Oh, and I just tried this on another machine: I put the c:\directx\lib directory at the head of the libraries. It now links and runs fine on that machine. Still not working on the lab machines.
Could you post the 'LIB' and 'INCLUDE' environment variables for both machines?
ASKER
On the machine that isn't working:
INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\;C:\ Program Files\Microsoft Visual Studio\VC98\atl\include;C: \Program Files\Microsoft Visual Studio\VC98\mfc\include;C: \Program Files\Microsoft Visual Studio\VC98\include
LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\;C:\Prog ram Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Pro gram Files\Microsoft Visual Studio\VC98\lib
On the machine that is working:
INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\;C:\ Program Files\Microsoft SDK\Include\.
LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\;C:\Prog ram Files\Microsoft SDK\Lib\.
On the machine that is not working, I'm going to try changing from the December DirectX9.0 to the February version, just out.
INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\;C:\
LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\;C:\Prog
On the machine that is working:
INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\;C:\
LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\;C:\Prog
On the machine that is not working, I'm going to try changing from the December DirectX9.0 to the February version, just out.
ASKER
Just updated to February version of DirectX 9.0; no effect: library is still called corrupt at link time. The error:
dinput8.lib(dilib1.obj) : fatal error LNK1103: debugging information corrupt; recompile module
dinput8.lib(dilib1.obj) : fatal error LNK1103: debugging information corrupt; recompile module
ASKER
Reinstalled Visual 6.0; no effect.
ASKER
I'm attempting to close the question, as I have found the answer elsewhere. See https://www.experts-exchange.com/questions/21741453/23-Feb-Found-the-answer-elsewhere-to-DirectX-Visual-6-0-unresolved-external-symbol-IID-IDirectInput8A.html .
ASKER
I answered the question myself, via web search. The answer is from GameDev.net ( http://www.gamedev.net/community/forums/showfaq.asp?forum_id=10 ):
"Also, if you're using VC++ 6, [DirectX] is not supported starting from the December 2004 SDK, so you either have to upgrade, or use another SDK (Like the October 2004 SDK with the extras package that comes with it)."
"Also, if you're using VC++ 6, [DirectX] is not supported starting from the December 2004 SDK, so you either have to upgrade, or use another SDK (Like the October 2004 SDK with the extras package that comes with it)."
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.