PRB: Link Error LNK1104: Cannot Open File OLECLI32.LIB

Last reviewed: December 23, 1997
Article ID: Q125622
The information in this article applies to:
  • Microsoft Visual C++ 2.0, 32-bit edition, version 2.0, 2.1, 4.0, 5.0

SYMPTOMS

When converting a project from version 1.0 of Visual C++ 32-bit Edition to version 2.x or 4.0, the linker generates the following error:

   error LNK1104: cannot open file "olecli32.lib"

   -or-

   error LNK1104: cannot open file "olesvr32.lib"

CAUSE

Visual C++ 32-bit Edition OLE libraries OLECLI32.LIB and OLESVR32.LIB of version 1.0 have been replaced by OLE libraries OLE32.LIB and OLEAUT32.LIB for versions 2.x and 4.0. (OLE32.LIB and OLEAUT32.LIB are import libraries for OLE32.DLL and OLEAUT32.DLL.) In converting the makefile, Visual C++ version 2.x or 4.0 specifies the outdated OLE library files instead of the new versions supplied.

RESOLUTION

Remove the OLECLI32.LIB and OLESVR32.LIB files from the list of library modules. To do this, choose Settings from the Project menu in Visual C++ version 2.x or from the Build menu in Visual C++ version 4.0. Then choose the Link property sheet or Tab to bring up the list of library modules. Delete OLECLI32.LIB and OLESVR32.LIB, press OK to save your changes. Rebuild the project.

MORE INFORMATION

The project to be converted was created originally with Visual C++ 32-bit Edition, version 1.0. It contains a list the of object and libraries modules necessary to build the project. The OLE libraries OLECLI32.LIB and OLESVR32.LIB are among this list. When the project is converted, this information is consulted. However, Visual C++ version 2.x or 4.0 has no way to know whether or not a project depends upon a particular module or was simply using the module version available. Thus, it does not exclude what may be outdated modules.

Keywords          : VwbIss kbenv kbtshoot kbusage
Version           : 2.0 2.1 4.0 5.0
Platform          : NT WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 23, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.