• Advertisement

Archived

This topic is now archived and is closed to further replies.

DirectInput Linker errors.

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

This may be a silly answer, but did you try linking with dinput.lib?

[This message has been edited by pdown (edited October 08, 1999).]

Share this post


Link to post
Share on other sites
Advertisement
Yes, I did.
The compiler only moans about UID_SysKeyboard and GUID_SysKey.

Share this post


Link to post
Share on other sites
bosjoh,
Are you perhaps using the DX7 borland libs? I know that during the beta, the lib's had an error in them. They should be fine now. Did you upgrade to DX7 gold?

Six

Share this post


Link to post
Share on other sites
Nope, using VC++ 6.0 libs.
Is this upgrade also available for VC++ 6.0?
I hope it isn't 128 MB (!)

Share this post


Link to post
Share on other sites
bosjoh,
When I said DX7 gold, I meant the RTM. If you have the final version, you should be fine.

Six

Share this post


Link to post
Share on other sites
You do not need to include the dxguid.lib
AND #define INITGUID as stated above. Just #define INITGUID would do in most cases. Adding the lib would only increase the size of your exe-file. Try without the lib, if it works then, do not use it.

Christoffer Sandberg
todderod@algonet.se

Share this post


Link to post
Share on other sites
I'm trying to create a directinput object and then creating a keyboard object. All fine, but the linker is giving 'unresolved reference' errors. I've included some code:

bool DirectInputInit(){
HRESULT dirval;
dirval = DirectInputCreate((HINSTANCE)GetWindowLong(windowhandle,GWL_HINSTANCE), DIRECTINPUT_VERSION, &lpDI, NULL);
if( dirval != DI_OK) return(false);
dirval = lpDI->CreateDevice(GUID_SysKeyboard,&lpKeyboard,NULL);
if( dirval != DI_OK) return(false);
dirval = lpKeyboard->SetDataFormat(&c_dfDIKeyboard);
if( dirval != DI_OK) return(false);
dirval = lpKeyboard->SetCooperativeLevel(windowhandle,DISCL_EXCLUSIVE | DISCL_FOREGROUND);
if( dirval != DI_OK) return(false);
lpKeyboard->Acquire();
return(true);
};

Share this post


Link to post
Share on other sites

  • Advertisement