Jump to content
  • Advertisement
Sign in to follow this  

SetDataFormat and c_dfDIJoystick2

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

hi all~ i'm consulting DirectInput to build a demo program which we can use joystick. but unluckily when i met c_dfDIJoystick2 which make compiler report a few errors. i searched the dinput.h and found it is an extern const and nothing more. anyone could figure it out pls ? tks. my code : g_lpJoystick1->SetDataFormat( &c_dfDIJoystick2 ); errors: dinput.lib(dilib4.obj) : error LNK2001: unresolved external symbol _GUID_POV dinput.lib(dilib4.obj) : error LNK2001: unresolved external symbol _GUID_Slider dinput.lib(dilib4.obj) : error LNK2001: unresolved external symbol _GUID_RzAxis dinput.lib(dilib4.obj) : error LNK2001: unresolved external symbol _GUID_RyAxis dinput.lib(dilib4.obj) : error LNK2001: unresolved external symbol _GUID_RxAxis dinput.lib(dilib4.obj) : error LNK2001: unresolved external symbol _GUID_ZAxis dinput.lib(dilib4.obj) : error LNK2001: unresolved external symbol _GUID_YAxis dinput.lib(dilib4.obj) : error LNK2001: unresolved external symbol _GUID_XAxis Debug/Project1.exe : fatal error LNK1120: 8 unresolved externals Error executing link.exe. Project1.exe - 9 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Advertisement
Quoting from the DirectX SDK's FAQ:

"I get linker errors about multiple or missing symbols for globally unique identifiers (GUIDs), what do I do?
The various GUIDs you use should be defined once and only once. The definition for the GUID will be inserted if you #define the INITGUID symbol before including the DirectX header files. Therefore, you should make sure that this only occurs for one compilation unit. An alternative to this method is to link with the dxguid.lib library, which contains definitions for all of the DirectX GUIDs. If you use this method (which is recommended), then you should never #define the INITGUID symbol."

Share this post


Link to post
Share on other sites
Quote:
Original post by Nik02
Quoting from the DirectX SDK's FAQ:

"I get linker errors about multiple or missing symbols for globally unique identifiers (GUIDs), what do I do?
The various GUIDs you use should be defined once and only once. The definition for the GUID will be inserted if you #define the INITGUID symbol before including the DirectX header files. Therefore, you should make sure that this only occurs for one compilation unit..."


how to define INITGUID symbol pls ?

Share this post


Link to post
Share on other sites
Quote:
Original post by blackgame
Quote:
Original post by Nik02
Quoting from the DirectX SDK's FAQ:

"I get linker errors about multiple or missing symbols for globally unique identifiers (GUIDs), what do I do?
The various GUIDs you use should be defined once and only once. The definition for the GUID will be inserted if you #define the INITGUID symbol before including the DirectX header files. Therefore, you should make sure that this only occurs for one compilation unit..."


how to define INITGUID symbol pls ?


#define INITGUID

Although it is reccomended you just link to dxguid.lib.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!