[This message has been edited by pdown (edited October 08, 1999).]
DirectInput Linker errors.
Yes, I did.
The compiler only moans about UID_SysKeyboard and GUID_SysKey.
The compiler only moans about UID_SysKeyboard and GUID_SysKey.
To use GUID, you also need to include
dxguid.lib
and you need to
#define INITGUID
dxguid.lib
and you need to
#define INITGUID
g'luck
-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
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?
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
Nope, using VC++ 6.0 libs.
Is this upgrade also available for VC++ 6.0?
I hope it isn't 128 MB (!)
Is this upgrade also available for VC++ 6.0?
I hope it isn't 128 MB (!)
bosjoh,
When I said DX7 gold, I meant the RTM. If you have the final version, you should be fine.
When I said DX7 gold, I meant the RTM. If you have the final version, you should be fine.
Six
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.
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
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);
};
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement