Where does this warning LNK4089 come from?

Posted on 2006-05-04
Last Modified: 2008-02-01
I mostly used VC++6 to program my main projects. I have the habit of eliminating not only errors (of course) but also any warning after the compilation. However lately I found several compilations that gave the followinf warning:
LINK : warning LNK4089: all references to "OLEPRO32.DLL" discarded by /OPT:REF
I tried to find the root cause of this warning but couldn't see anything. I wonder where does that come from? I hope some experts would give some suggestions.
Question by:Volga
    LVL 53

    Expert Comment

    This just means that the linker has optimized out the OLEPRO32.DLL library ... Your code is apparently not using this library, although you did add it to the project linker options.

    So, either remove that DLL from the linker options, or ignore the warning ...

    Author Comment

    Hellp Infinity,
    Thanx for the advice. However  couldn't find anywhere in the projects settings where that olepro32.dll is. This is a new project and I'm sure I never added that olepro32.dll either.
    Please can you let me know how to remove that dll.
    LVL 53

    Accepted Solution

    You probably created a GUI by adding components to it using the VC++ graphical interface ? If so, then you probably added a component that has that dependency ... which was subsequently optimized out by the linker.

    I wouldn't worry about it, unless you notice that your application doesn't behave the way it should because of this.
    LVL 39

    Assisted Solution

    >>>> However  couldn't find anywhere in the projects settings where that olepro32.dll is

    Goto Project-Settings-Link page and copy all linker settings of the "Project Options" edit box to the clipboard. Output the contents to an empty text window and search for "olepro32.lib". If you find it you might remove it by choosing the "Input" category in the Link tab and editing the "Object/libraries modules" edit field. If you don't find it, ignore the message as Infinity already told you.

    Olepro32.lib was needed for Active-X controls added in the resource editor.

    Regards, Alex

    Author Comment

    Well I still can't get rid of that stupid warning. Just bothered me symbollically.
    Thankx anyway for advice from both of you. So I'm going to split the points for you two.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
    Article by: SunnyDark
    This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now