1.50 1.51 1.52 1.52A
WINDOWS
kbtool
---------------------------------------------------------------------
The information in this article applies to:
- The Microsoft Linker (LINK.EXE) included with:
Microsoft Visual C++ for Windows, version 1.5, 1.51, 1.52, 1.52A
---------------------------------------------------------------------
SYMPTOMS
========
When building a dynamic-link library (DLL) with Visual C++ that links with
ODBC.LIB, the following linker error occurs:
L2023 : entry WEP : export imported
CAUSE
=====
The 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.
RESOLUTION
==========
If 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.DLL
Execute 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.
STATUS
======
This behavior is by design.
REFERENCES
==========
For 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
KBCategory: kbtool kbprb
KBSubcategory: LinkIss MfcDatabase