Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectInput8 Linker error

Started by SoulSkorpion Mar 2, 2004 at 12:07 AM 3 replies 1.1k views
Original Post
SoulSkorpion
SoulSkorpion
I''m using the DirectX 9 SDK, writing code from this GDNet tutorial. It says that I "have to include dinput.h. Also, you have to link dxguid.lib and dinput8.lib", all of which I''ve done. I''m getting the error "undefined reference to `DirectInput8Create@20''". I assume this is because I''m not including the right libraries. What am I missing?
-------------"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."- Charles Babbage (1791-1871)
Elandsong
Elandsong
I think it''s just dinput8.lib.
Check your library path.
Good luck!
SoulSkorpion
SoulSkorpion
They''re all correct, as far as I can tell

I did forget about them the first time (and got a whole pile of linker errors), I set the directories and linker options to include those files, and it got rid of all the linker errors except for that one. Don''t suppose it could be a problem with my copy of the DX SDK?
-------------"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."- Charles Babbage (1791-1871)
SoulSkorpion
SoulSkorpion
Oh, I probably should have mentioned this earlier, but I'm using Dev-Cpp.

[edit]AARGH. On chasing down the keyboard demo that comes with the SDK, importing it into Dev-CPP, copying across all the .h files which it couldn't find for some reason and compiling, I'm getting the same linker errors. Compiling under a crappy coppy of MSVC++ I've got worked prefectly. So this seems to be a problem with Dev-CPP or its compiler. If anyone knows any work-arounds for this, I'd be extremely grateful.[/edit]

[edited by - SoulSkorpion on March 2, 2004 10:40:38 PM]
-------------"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."- Charles Babbage (1791-1871)
Muhammad Haggag
Muhammad Haggag
quote:
Original post by SoulSkorpion
Oh, I probably should have mentioned this earlier, but I''m using Dev-Cpp.

[edit]AARGH. On chasing down the keyboard demo that comes with the SDK, importing it into Dev-CPP, copying across all the .h files which it couldn''t find for some reason and compiling, I''m getting the same linker errors. Compiling under a crappy coppy of MSVC++ I''ve got worked prefectly. So this seems to be a problem with Dev-CPP or its compiler. If anyone knows any work-arounds for this, I''d be extremely grateful.[/edit]

- DevCPP uses Mingw gcc, so I''d try building the project with gcc through the command line, and see if it can be fixed (maybe DevCPP isn''t passing the correct parameters to the compiler).

- I''d also try the DevCPP mailing list (there''s a link somewhere on bloodshedDev''s homepage)

Muhammad Haggag
Bitwise account: MHaggag -

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.