The information in this article applies to:
SYMPTOMS
Building a project that includes the code listed in the "Sample Code"
section of this article results in the following link error or warning:
For Visual C++, 32-bit Edition: Here xxxxx is the decorated name for str. RESOLUTIONTo work around the problem, explicitly declare the const as static, as in this example:
This definition can be placed in a header file, and can be included in
multiple source files. However, there are implications for the size of the
program when you use this workaround. That is, a copy of the array and of
the strings will be in every module that includes the header file, whether
you use it or not. The sample code below shares this problem.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++, 32- bit Edition, version 2.0. MORE INFORMATION
In C++, const objects do not have external linkage, unless they are
explicitly declared extern. Const objects have internal linkage, meaning
that the name of the object is local to the source file in which it is
declared.
Sample Code
Additional query words: 1.00 1.50 1.51 1.52 8.00 8.00c
Keywords : kbCodeGen kbCompiler kbCPPonly kbVC |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |