warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF

警告: warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF。

原因:The linker discarded all packaged functions that referenced exports in dynamic-link library. As a result, dynamic-link library and its import library are unneeded。

解决方法1:在Project-->Setting->Link选项中的Object/library modules中添加"/OPT:NOREF "。

解决方法2:使用"#pragma warning(disable:4089)"屏蔽该warning。

原文地址:https://www.cnblogs.com/zhangpengshou/p/1520806.html