error LNK2019: 无法解析的外部符号 __imp__DispatchMessageW@4,该符号在函数 _WinMain@16 中被引用

出现错误:

1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__DispatchMessageW@4,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__TranslateMessage@4,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__GetMessageW@16,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__UpdateWindow@4,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__ShowWindow@8,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__CreateWindowExW@48,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__RegisterClassW@4,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__LoadIconW@8,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__LoadCursorW@8,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__GetStockObject@4,该符号在函数 _WinMain@16 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__DefWindowProcW@16,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__PostQuitMessage@4,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__DestroyWindow@4,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__EndPaint@8,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__BeginPaint@8,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__ReleaseDC@8,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__TextOutW@20,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__GetDC@4,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>WinMain.obj : error LNK2019: 无法解析的外部符号 __imp__MessageBoxW@16,该符号在函数 "long __stdcall WinSunProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinSunProc@@YGJPAUHWND__@@IIJ@Z) 中被引用
1>.\Debug\WinMain.exe : fatal error LNK1120: 19 个无法解析的外部命令




LINK时找不到所需要的LIB文件,在程序前面加上语句
#pragma comment  (lib,"User32.lib")
#pragma comment  (lib,"Gdi32.lib")


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值