The information in this article applies to:
SUMMARY
LINK error L2023 is caused by an incorrect library link order. The linker
resolves external references in order of appearance of the libraries,
choosing the first occurrence of a label. This error occurs when a dynamic-
link library (DLL) exports the routine Windows exit procedure (WEP) that
will be brought in from the C Run-time library static .OBJs, but the linker
finds another DLL's WEP in its .LIB file because it appears BEFORE the C
Run-time library.
MORE INFORMATIONIf the MFC libraries are used, they should be included before any other libraries. As for the other libraries, the Windows libraries should be included first (that is, LIBW, COMMDLG, SHELL, and so forth), the C Run- time second (that is, xLIBCyW.LIB for applications or xDLLCyW.LIB for DLLs), and any additional third-party libraries last (that is, your own or other's .LIBs). For example, when linking a small model DLL that uses another DLL's routines via an import library, the library order would be "LIBW.LIB SDLLCEW.LIB OTHERDLL.LIB". The order should be changed only if a DLL routine was to replace one of the routines in the Windows libraries or CRT. Additional query words: 3.10
Keywords : kb16bitonly |
Last Reviewed: November 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |