Using an uninitialized structure
Walter Bright
newshound1 at digitalmars.com
Mon Sep 3 11:25:38 PDT 2007
B.Schulte wrote:
> CHAR_INFO buffer[]; buffer.length = 100; foreach( inout CHAR_INFO ci;
> buffer ) { ci.Char.AsciiChar = ' '; ci.Attributes=7; }
>
> If I try to compile this (even without the foreach) I get a linker
> error. The Linker can't find the __INIT symbol of the CHAR_INFO
> structure.
The init symbol for a struct is placed into the object file generated by
the source module that defines that struct. In this case, you need to
link in the compiled module that defines CHAR_INFO.
More information about the Digitalmars-d
mailing list