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. annoying linker warning (LNK4089)

annoying linker warning (LNK4089)

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studio
3 Posts 3 Posters 1 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.
  • I Offline
    I Offline
    Intangir
    wrote on last edited by
    #1

    i seem to get this warning on damn near any MFC project i've used on Visual Studio .net LINK : warning LNK4089: all references to 'OLEAUT32.dll' discarded by /OPT:REF i looked it up and apparently the linker is decided that i dont need OLEAUT32.dll cause nothing is using it.. but i cant figure out where in the world any part of my project is mentioning OLEAUT32.dll in the first place. so im not sure why the linker thinks i wanted it in the first place

    T G 2 Replies Last reply
    0
    • I Intangir

      i seem to get this warning on damn near any MFC project i've used on Visual Studio .net LINK : warning LNK4089: all references to 'OLEAUT32.dll' discarded by /OPT:REF i looked it up and apparently the linker is decided that i dont need OLEAUT32.dll cause nothing is using it.. but i cant figure out where in the world any part of my project is mentioning OLEAUT32.dll in the first place. so im not sure why the linker thinks i wanted it in the first place

      T Offline
      T Offline
      Tim Smith
      wrote on last edited by
      #2

      With many include files, they have a #pragma statement that adds the DLL/LIB as a required DLL/LIB during the link phase. For example, COMDEF.H includes: #pragma comment(lib, "oleaut32.lib") Tim Smith I'm going to patent thought. I have yet to see any prior art.

      1 Reply Last reply
      0
      • I Intangir

        i seem to get this warning on damn near any MFC project i've used on Visual Studio .net LINK : warning LNK4089: all references to 'OLEAUT32.dll' discarded by /OPT:REF i looked it up and apparently the linker is decided that i dont need OLEAUT32.dll cause nothing is using it.. but i cant figure out where in the world any part of my project is mentioning OLEAUT32.dll in the first place. so im not sure why the linker thinks i wanted it in the first place

        G Offline
        G Offline
        Gary R Wheeler
        wrote on last edited by
        #3

        This warning is harmless, and can be ignored if the DLL in question is one of the system DLL's. In that case, a piece of library code (which may have been omitted due to function-level linking) referenced the DLL, and you no longer need it. If the DLL in the message is one of yours, you may want to check.


        Software Zen: delete this;

        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