问题描述:
dialog.obj:-1: error: LNK2019: 无法解析的外部符号 __imp_RegisterDeviceNotificationW,函数 "private: int __cdecl Dialog::DoRegisterDeviceInterface(void)" (?DoRegisterDeviceInterface@Dialog@@AEAAHXZ) 中引用了该符号
D8.obj:-1: error: LNK2019: 无法解析的外部符号 __imp_wsprintfA,函数 "public: void __cdecl D8::ByteArrayToHexString(unsigned char *,char *,int)" (?ByteArrayToHexString@D8@@QEAAXPEAEPEADH@Z) 中引用了该符号
解决办法:
#include <windows.h>
#pragma comment(lib, "user32.lib")