LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF
为什么我编译成Release版的就会出现以上的错误..(用动态连接库)
动态连接和静态连接有什么区别呢?
而DEBUG版的不会.....

解决方案 »

  1.   

    This warning simply means that you are linking against a library and the linker has detected that you are not really using any functions from it. This warning usually only pops when you are making release builds, because the /OPT:REF switch of the linker that's set by default on release builds asks the linker to trim your resulting executable as much possible by avoiding linking unnecessary dlls in. (this makes the import address table of your executable much smaller). If you don't care about the warning, you can tell the linker to ignore it by adding the /IGNORE:4089 switch to the linker command line from the Project->Settings dialog.
      

  2.   

    但是为什么静态的Release不会有这个问题??
    请详解.....
      

  3.   

    The Microsoft LINK.EXE program  can tellllll us only!
    Was it just a lucky guess?
      

  4.   

    what ?
    what's the lukcy guess....
      

  5.   

    这个问题很难的
    我碰到过很多次
    有时候是debug没事
    但一release就会发生类似的错误
    你最好看一下你的全局变量
    还有文件间的包含关系