Jump to content
  • Advertisement
Sign in to follow this  
TrickHat

Help please!!!

This topic is 5475 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

Okay, I'm a little new to C++ and DirectX. I've been working on getting DirectX8 or 9 to run, but I keep getting problems. First I had the following... Linking... InputManager.obj : error LNK2001: unresolved external symbol _DirectInput8Create@20 InputManager.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A Joystick.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ) Keyboard.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ) Mouse.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ) Joystick.obj : error LNK2001: unresolved external symbol _c_dfDIJoystick2 Keyboard.obj : error LNK2001: unresolved external symbol _c_dfDIKeyboard Keyboard.obj : error LNK2001: unresolved external symbol _GUID_SysKeyboard Mouse.obj : error LNK2001: unresolved external symbol _c_dfDIMouse Mouse.obj : error LNK2001: unresolved external symbol _GUID_SysMouse Debug/proj 1_1.exe : fatal error LNK1120: 8 unresolved externals Error executing link.exe. proj 1_1.exe - 11 error(s), 0 warning(s) I read somewhere to put the following lines in the file... #pragma comment(lib,"dxguid.lib") #pragma comment(lib,"dinput8.lib") which helped for the most part, but now I get these errors. Linking... Joystick.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ) Keyboard.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ) Mouse.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ) Debug/proj 1_1.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. proj 1_1.exe - 4 error(s), 0 warning(s) I have no idea what's going on, or how to fix this. If somebody knows, an answer would be much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by TrickHat
Linking...
Joystick.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ)
Keyboard.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ)
Mouse.obj : error LNK2001: unresolved external symbol "public: struct IDirectInput8A * __thiscall InputManager::GetInput(void)" (?GetInput@InputManager@@QAEPAUIDirectInput8A@@XZ)
Debug/proj 1_1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I guess somewhere in your implementation (C++) files you have a typo with that GetInput proc of yours. Perhaps you have written
IDirectInput8* GetInput() instead of
IDirectInput8* InputManager::GetInput().

Other than that, I don't know. If the problem still comes up, let me know, so I can try to reproduce it myself.

Thermo/Konfu



Share this post


Link to post
Share on other sites
You need to include a library in your linker command. Try adding dinput8.lib or dinput.lib by going into you Project->Properties menu (assuming you are using MS Visual Studio C++). If the project is highlighted in the tree to the left of the dialouge box that opens up, you will be able to click on the ???? tab that show the various "*.lib" library files that are being used. Add dinput.lib on that line with the other libraries.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!