The information in this article applies to:
SYMPTOMSUsing _declspec(dllexport) or _declspec(dllimport) on a class with multiple static variable definitions may cause a C2487 error to be generated on all but the first variable. For example, consider this class declaration:
This class declaration generates these errors:
RESOLUTIONMove each static variable declaration to its own line. To fix the above class so that it will compile cleanly, use this:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. Additional query words: kbVC400bug dllimport export afxdll 9.00 9.10 10.00 10.10 10.20
Keywords : kbLangCPP kbVC kbVC500bug |
Last Reviewed: April 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |