KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q168251: FIX: Odbccp32.lib Requires Msvcrt.lib to Compiler

Article: Q168251
Product(s): Open Database Connectivity (ODBC)
Version(s): WINDOWS:3.0
Operating System(s): 
Keyword(s): kbprogramming
Last Modified: 28-AUG-1999

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Open Database Connectivity, version 3.0 
-------------------------------------------------------------------------------

BUG #: 4637 (odbc3)

SYMPTOMS
========

An ODBC application may get the following link errors when linking with
Odbccp32.lib;

  odbccp32.lib(dllload.obj) : error LNK2001:
  unresolved external symbol __imp__rename

  odbccp32.lib(dllload.obj) : error LNK2001:
  unresolved external symbol __imp___stat

CAUSE
=====

Odbccp32.lib is not a pure import library. It contains some object code that has
unsatisfied externals: rename and state. The rename and state functions are
defined in Msvcrt.lib.

WORKAROUND
==========

To work around this problem, make sure an ODBC application links Msvcrt.lib
before Odbccp32.lib.

STATUS
======

Microsoft has confirmed this to be a problem in Microsoft Open Database
Connectivity version 3.0. This problem has been corrected in U.S. Service Pack 1
for Microsoft Open Database Connectivity, version 3.0. For more information,
contact your primary support provider.

Additional query words: link c compiler

======================================================================
Keywords          : kbprogramming 
Technology        : kbAudDeveloper kbODBCSearch kbODBC300
Version           : WINDOWS:3.0
Issue type        : kbbug
Solution Type     : kbfix

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

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.

Copyright Microsoft Corporation 1986-2002.