PRB: ODBC.LIB Causes Error L2023: entry WEP: export importedLast reviewed: July 22, 1997Article ID: Q133069 |
1.50 1.51 1.52 1.52A
WINDOWS
kbtool
The information in this article applies to:
SYMPTOMSWhen building a dynamic-link library (DLL) with Visual C++ that links with ODBC.LIB, the following linker error occurs:
L2023 : entry WEP : export imported CAUSEThe ODBC.LIB file that ships with Visual C++ and the ODBC Software Development Kit (SDK) publicly export the Window Exit Procedure (WEP). Because this function must be exported by all 16-bit DLLs, including this library in a DLL project causes the L2023 link error.
RESOLUTIONIf ODBC is not being used in the DLL, simply remove ODBC.LIB from the list of additional libraries. If ODBC is needed, generate a new import library from ODBC.DLL by using the IMPLIB utility. The following command generates a replacement library for ODBC.LIB called NEWODBC.LIB that does not contain a reference to WEP:
IMPLIB /nowep NEWODBC.LIB ODBC.DLLExecute this command from the directory that contains ODBC.DLL. After creating NEWODBC.LIB, copy it into the Visual C++ LIB directory, and change the project setting to use NEWODBC.LIB instead of ODBC.LIB.
STATUSThis behavior is by design.
REFERENCESFor more information, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q104246 TITLE : Causes of L2023 : Entry WEP : Export Imported |
Additional reference words: 1.50 1.51 1.52 1.52A
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |