Skip to main content
gamedev.net
🔒 Locked

DirectInput

Started by Danias Nov 9, 2000 at 5:31 AM 16 replies 1.5k views
Original Post
Danias
Danias
Hi! i want to use directinput, but it doesn''t seem to work. everytime i call ''directinputcreate'' the compiler gives me a linker error: unresolved external ''directinputcreatea'' referenced from blablabla i really wonder why this message shows up. it only shows up on the ''directinputcreate'' and ''directinputcreateex''. how would the code look if i used cocreateinstance? Thanks!
Jankey
Jankey
It is easy:

YOu have to include the "dinput.h"!!!
And there are also 2 LIBS:

dxguid.lib
dinput.lib

if you link these 2 lib it should work!!!

Jankey
J.A.N.K.E.Y.: Journeying Artificial Nocturnal Killing and Exploration Youth
Danias
Danias
Yes, I included the header and the libs, but it doesn''t work. I already implemented DirectDraw and it works fine...

That''s the problem I''m having. When I first wrote the DirectDraw routine. I included the ''ddraw.h'', the ''ddraw.lib'' and the ''dxguid.lib''. I wrote the routines in a dxdraw.cpp

Then I started working on the DirectInput routines. I started the same way as with ddraw, but...
Danias
Danias
Well, at least DirectDraw works fine, it might be a bad lib (DirectInput), though I don''t think that''s the problem. I''ve been fuzzing around with that problem for a couple of hours, but it still doesn''t work. Quite strange...
saisoft
saisoft
Try using the ''directinputcreateex'' instead of directinputcreate
Danias
Danias
Saisoft - I also tried that one. The error showed up anyway. I will keep on looking.

Thanks anyway!
saisoft
saisoft
I have never done any directx programming, but does the directinputcreate function take any structures as parameters and if it does, is there and extended structure that you were using
Danias
Danias
Saisoft - directinputcreate does take some parameters, but that''s not the point. you see, I''ve come to the point where I typed in the example in the SDK and it still won''t work.

furby - I use BCB5.0 Enterprise Edition and yes, I use the Borland libs (I''ve been checking on that about a thousand times) ;-)

But, I''ve been investigating on that problem: Every time I recompile the whole thing (not only the editet parts) I get the following error:

Error processing module

It''s another linker error, and the bad thing is that it seems to be the dinput.lib...

Now, when I recompile only the editet parts I get the ''unresolved external...'' (see above).

I just don''t get it. :-(
risingdragon3
risingdragon3
Ah, the wonders of DInput.lib. The Microsoft version AND the new ''borland'' version libs have a error in them that makes BCB - VERSION 5 ONLY!! - complain of an ''error processing module''. What you must do, is to implib DInput.dll, then dump the cdfi_*** constants into a file for reading. I struggled with this problem before, luckily I had version 3 that allowed me to access the M$ version of Dinput.lib and dump the data. I can give you it if you like w/ the function to read it. And, an implib''ed dinput.lib, so everything will work.

------------------------------
BCB DX Library - RAD C++ Game development for BCB
Danias
Danias
C++ freak - It would be way cool if you could send me those files! Finally I have an answer to my question! Thanks!!
furby100
furby100
run Implib to make an import library of dinput.dll in c:\windows\system. Then put this library with all your other libs and delete your old one. Unfortunately you will no longer have c_dfDIKeyboard and the rest so you will need to link in dxextra.lib which is in your main lib directory.



Please state the nature of the debugging emergency.


sharewaregames.20m.com

Danias
Danias
furby - It actually works!! Thanks guys!
Jankey
Jankey
I have made a Direct Input Tutorial --->

at : "www.jankeytec.com"

At the Basics Section: Sorry but it is German (I am an Austrian)



perhaps there is an Error with DDraw --> Write A Programm "only" with DInput. If it doesnt owrk: I dont know!

J.A.N.K.E.Y.: Journeying Artificial Nocturnal Killing and Exploration Youth
Etnu
Etnu
Why would anything happen to your 2D code if you don''t use anything new?

Thanks,
Etnu

Sometimes I think I know what I really don''t, but then again usually I do know what I don''t, but just don''t realize it, maybe its because I am so young, but then again it could be because I am insane.
---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.

Topic Locked

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

Sign in to reply to this topic.