我有一个基于对话框的程序,创建的时候选择了把MFC库作为静态链接。当我编译链接debug版本时一切顺利,可我选择release版本链接时出现警告“LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF”!请问如何解决??

解决方案 »

  1.   

    The linker discarded all packaged functions that referenced exports in dynamic-link library. As a result, dynamic-link library and its import library are unneededUse /VERBOSE to see which of your functions the linker is discarding and then remove them from your code.你可以用#program warning(disable,4089)让他不显示
      

  2.   

    Vc6.0,
    Project -> Settings -> Link tab -> Category:
    General -> check "Link Incrementally"
      

  3.   

    删除DEUBG文件侠.重新编译一次链接器放弃了引用 dynamic-link library 中的导出的所有封装函数。因此,执行图像并不需要 dynamic-link library。可能需要考虑移除 dynamic-link library 引用以加快生成速度。如果代码中未使用的函数引用链接器已放弃的 .dll 导出,也可能会出现此警告。使用 /VERBOSE 查看链接器所放弃的函数,然后将它们从代码中移除。
      

  4.   

    在link Option 中添加/IGNORE:4089