This one is driving me nuts. I've tried everything I can think of. Here are the relevant parts of the DirectInput code.
BOOL CALLBACK EnumDevicesCallback(const DIDEVICEINSTANCE* DeviceInfo, VOID* Context);
if(DirectInput8Interface == DI_OK)
{
DirectInput8InterfacePointer->EnumDevices(
DI8DEVCLASS_GAMECTRL,
(LPDIENUMDEVICESCALLBACKA) EnumDevicesCallback,
NULL,
DIEDFL_ATTACHEDONLY);
}
When I try to compile, I get the error:
unresolved external symbol "int __stdcall EnumDevicesCallback(struct DIDEVICEINSTANCEA const *,void *)" (?EnumDevicesCallback@@YGHPBUDIDEVICEINSTANCEA@@PAX@Z) referenced in function _WinMain@16.
As you can see, the external symbol the compiler can't find is related to the DIDEVICEINSTANCE parameter of the EnumDevicesCallback function. That shouldn't be, because I've included dinput.h and linked to dinput8.lib and dxguid.lib. I even tried defining DIDEVICEINSTANCE in my own code and got a message that it conflicted with a previous definition.
What could that error message mean?