qtmaind.lib(qtmain_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CommandLineToArgvW,该符号在函数 WinMain 中被引用

报错:qtmaind.lib(qtmain_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CommandLineToArgvW,该符号在函数 WinMain 中被引用

原因: 未包含Shell32.lib
 

解决1:

#pragma comment(lib, "Shell32.lib")

解决2:

属性管理器:链接器->输入->附加依赖项->Shell32.lib (在常规中添加好对应附加库目录)

参考:https://blog.csdn.net/Ada_who/article/details/80159064

原文地址:https://www.cnblogs.com/2018shawn/p/11320998.html