As the title suggests, I am having the following linker error:
error LNK2019: unresolved external symbol “unsigned char __stdcall
HidD_GetAttributes(void *,struct _HIDD_ATTRIBUTES *)”
(?HidD_GetAttributes@@YGEPAXPAU_HIDD_ATTRIBUTES@@@Z)
when calling result = HidD_GetAttributes(WriteHandle, &attributes) in my code.
This function should exist in “hid.lib” which I have added to my linker dependencies for the project. I have also included the header file “hidsdi.h” which has the function prototype for HidD_GetAttributes.
The only other thing that I thought might be problematic is that the function prototypes for “hid.lib” are split between three different headers: hidsdi.h, hidpi.h, and hidsage.h.
Any suggestions?
Just solved the problem. Apparently “hid.lib” was written in C which was resulting in some name mangling. Using
cleared everything up.