在未使用第三方相机库时,项目正常使用setupapi.h,但导入第三方相机库后编译报错,提示以下错误:
serialenum.obj : error LNK2019: 无法解析的外部符号 __imp__SetupDiEnumDeviceInfo@12,该符号在函数 "public: void __thiscall CamSerialEnum::GetHardwareList(void)" (?GetHardwareList@CamSerialEnum@@QAEXXZ) 中被引用 serialenum.obj : error LNK2019: 无法解析的外部符号 __imp__SetupDiDestroyDeviceInfoList@4,该符号在函数 "public: void __thiscall CamSerialEnum::GetHardwareList(void)" (?GetHardwareList@CamSerialEnum@@QAEXXZ) 中被引用 serialenum.obj : error LNK2019: 无法解析的外部符号 __imp__SetupDiGetClassDevsW@16,该符号在函数 "public: void __thiscall CamSerialEnum::GetHardwareList(void)" (?GetHardwareList@CamSerialEnum@@QAEXXZ) 中被引用 serialenum.obj : error LNK2019: 无法解析的外部符号 __imp__SetupDiGetDeviceRegistryPropertyW@28,该符号在函数 "bool __cdecl GetDeviceProperty(void *,struct _SP_DEVINFO_DATA *,unsigned long,wchar_t *,unsigned long,unsigned long *)" (?GetDeviceProperty@@YA_NPAXPAU_SP_DEVINFO_DATA@@KPA_WKPAK@Z) 中被引用