The information in this article applies to:
SYMPTOMSWhen linking to an import library, you may get unresolved external errors (LNK2001) on objects that are exported using the __declspec(dllexport) attribute. This problem is most common when exporting a large number of classes from a DLL. CAUSE
The compiler generates export directives for each definition of an exported
object in a source file. The linker combines these into a list when
generating the executable that is translated into an import library. RESOLUTION
Here are three possible workarounds for this problem:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was fixed in Microsoft Visual C++, 32-bit Edition, version 4.0. MORE INFORMATIONThe following sample code illustrates how to conditionally compile code to avoid the problem. An example showing how to generate this bug would be too large to attach to this article because the source code would have to export more than 65536 symbols. Sample Code
Additional query words: 2.00 2.10 9.00 9.10
Keywords : kbcode LinkIss |
Last Reviewed: September 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |