Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. /OPT:REF issues - linker gurus please help

/OPT:REF issues - linker gurus please help

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestioncomdebuggingannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Spiritofamerica
    wrote on last edited by
    #1

    hello I have a problem when I link my program in Release Mode I get some crazy linker warnings like this: LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF LINK : warning LNK4089: all references to "comdlg32.dll" discarded by /OPT:REF and because of them some features of my program(namely all functions that have something to do with wininet.h) don't work any more. In Debug mode anything works ok. I see that some com objects that I use get this /OPT:REF thing going whenever I call some methods because if I put this in comments it works what is this /OPT:REF thing? anyway I can turn of this/OPT:REF thing??

    R 1 Reply Last reply
    0
    • S Spiritofamerica

      hello I have a problem when I link my program in Release Mode I get some crazy linker warnings like this: LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF LINK : warning LNK4089: all references to "comdlg32.dll" discarded by /OPT:REF and because of them some features of my program(namely all functions that have something to do with wininet.h) don't work any more. In Debug mode anything works ok. I see that some com objects that I use get this /OPT:REF thing going whenever I call some methods because if I put this in comments it works what is this /OPT:REF thing? anyway I can turn of this/OPT:REF thing??

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      There's no problems there. That's just saying that you told the linker to link to these libraries, but you didn't actually use anything from them, so the linker is not including them. To remove the warnings, remove the libraries from the linker setup of your project settings, but there's really no need to. They're just information anyway.

      Ryan

      "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

      A 1 Reply Last reply
      0
      • R Ryan Binns

        There's no problems there. That's just saying that you told the linker to link to these libraries, but you didn't actually use anything from them, so the linker is not including them. To remove the warnings, remove the libraries from the linker setup of your project settings, but there's really no need to. They're just information anyway.

        Ryan

        "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        I only include one library wininet.lib but if I remove it all the functions from wininet.h don't work I have no other librabies linked I am using MFC support in a static library

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups