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

Dev-Cpp and DirectInput

Started by SoulSkorpion Mar 28, 2004 at 3:47 AM 5 replies 1.3k views
Original Post
SoulSkorpion
SoulSkorpion
I''m trying to compile a wrapper for DirectInput based on one of the tutorials on Gamedev.net, using Dev-Cpp. Well, to be more accurate, it''s compiling ok but will not run. When I try to run the program I get a message box popping up saying "The procedure entry point c_dfDIKeyboard could not be located in the dynamic link library dinput.dll". Tracking down and copying dinput.dll into the same folder as the .exe didn''t help (I didn''t think it would, but it was worth a shot). I''ve got the latest version of the DirectX SDK, the Dev-Cpp DirectX Dev-Pack, and Dev-Cpp itself. Any help at all would be greatly appreciated, since I can''t really make anything useful without a way of getting user input...
-------------"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)
RobD
RobD
This error has something to do with libdinput.a file in the DirectX Dev-Pack. Try linking with the dinput.lib file from the DirectX SDK instead
SoulSkorpion
SoulSkorpion
quote:
This error has something to do with libdinput.a file in the DirectX Dev-Pack. Try linking with the dinput.lib file from the DirectX SDK instead

I''ve had a hell of a lot of difficulty trying to link the DX SDK libraries, posted about it in a variety of different places before finally learning about the Dev-Pack version. I guess I can try a combination of the Dev-Pack''s .as for most of it and dinput.lib for that bit...

Surely people have been able to write DirectX applications using only Dev-Cpp''s materials before? Oh well. I guess I''ll settle for workarounds at this stage. I''ll try it, and see what happens.




quote:
read the FAQ...


Bzzt. Wrong, but thanks for playing. Read the Post again - it''s not a linker error, it''s a dll error once the program''s already compiled. If this was so easily corrected by an FAQ question, I wouldn''t be posting.
-------------"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)
Oluseyi
Oluseyi
RobD is perfectly correct. The problem is that the DirectX DevPack didn''t export all symbols found in the dinput.lib file, so certain external references can not be resolved. As the exact nature of the reference in question is indeterminate (it''s a GUID is about all I know about it), trial and error is the only method available.

It is possible to skip the static import lib and directly load symbols from the DLL. Try that just for this symbol. I had found a page detailing techniques for all this, but I can''t find it right now. Look up pexport, dlltools and impgen.
SoulSkorpion
SoulSkorpion
Excellent! It''s working! Thanks for the help
-------------"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)

Topic Locked

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

Sign in to reply to this topic.