PRB: L2029 Error from Unsized Array Declaration at File ScopeLast reviewed: July 24, 1997Article ID: Q66775 |
The information in this article applies to:
SYMPTOMSAn attempt to link an application fails and Microsoft LINK generates the following message:
L2029: unresolved external CAUSEThe application declares an unsized array at file scope, and does not contain another declaration at file scope that specifies the size for the array.
RESOLUTIONModify the source code of one of the modules to declare the array with its correct size at file scope.
MORE INFORMATIONBecause an unsized array declaration at file scope is considered external, the C compiler cannot determine whether or not the size is omitted intentionally, and the compiler does not generate an error message. The following sample code demonstrates this situation:
Sample Code
int Array[]; void main(void) { printf("%d.\n", Array); }To address this situation, create another source file that declares Array to have a size (for example, "int Array[2]"), and compile and link the two modules. |
Keywords : LinkIss kbfasttip
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |