Hi.
I don't get it working. So I ask here.
There is the problem:
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.
Well, sure - there IS NO __init symbol - But I don't WANT to init it somehow
else.
I can't get it working :((
Thanks in advance for every help :)

Hi.
I don't get it working. So I ask here.
There is the problem:
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.
Well, sure - there IS NO __init symbol - But I don't WANT to init it somehow
else.
I can't get it working :((
Thanks in advance for every help :)

Well, the CHAR_INFO structure is stored in the win32.wincon file. There was
something I took from dsource to use the winAPI methods.
I didn't want to write in orginal files to fix a problem. I thought about
fixing the problem somewhere else. (Don't modify the wincon.d)
However, it still doesn't work.
Error 42: Symbol Undefined _D5win326wincon9CHAR_INFO6__initZ
There must be some way to use uninitialized variables :(
Regan Heath Wrote:

Well, the CHAR_INFO structure is stored in the win32.wincon file. There was
something I took from dsource to use the winAPI methods.
I didn't want to write in orginal files to fix a problem. I thought about
fixing the problem somewhere else. (Don't modify the wincon.d)
However, it still doesn't work.
Error 42: Symbol Undefined _D5win326wincon9CHAR_INFO6__initZ
There must be some way to use uninitialized variables :(

There is, but I don't believe it has anything to do with the error
you're getting. :)
You are missing a symbol, the symbol you are missing is mangled in such
a way that it is clear that it is a D symbol, which means you have
defined CHAR_INFO as a D struct, instead of using extern (C) as I have
shown you above.
What dsource project is win32.wincon in? Perhaps CHAR_INFO isn't
declared as extern (C) in there...
FYI, you can allocate an array of CHAR_INFO structures without
initialising like this:
CHAR_INFO[500] abuffer = void;
this is a fixed length array however, perhaps not what you want?
Regan

Well, the CHAR_INFO structure is stored in the win32.wincon file. There was
something I took from dsource to use the winAPI methods.
I didn't want to write in orginal files to fix a problem. I thought about
fixing the problem somewhere else. (Don't modify the wincon.d)
However, it still doesn't work.
Error 42: Symbol Undefined _D5win326wincon9CHAR_INFO6__initZ
There must be some way to use uninitialized variables :(

There is, but I don't believe it has anything to do with the error
you're getting. :)
You are missing a symbol, the symbol you are missing is mangled in such
a way that it is clear that it is a D symbol, which means you have
defined CHAR_INFO as a D struct, instead of using extern (C) as I have
shown you above.
What dsource project is win32.wincon in? Perhaps CHAR_INFO isn't
declared as extern (C) in there...
FYI, you can allocate an array of CHAR_INFO structures without
initialising like this:
CHAR_INFO[500] abuffer = void;
this is a fixed length array however, perhaps not what you want?
Regan

Well, it really wasn't declared as extern(C). But I inserted it and declared it
as extern(C). Don't know why, but it still don't work.
Here is the dsource project:
http://dsource.org/projects/core32

I didn't want to write in orginal files to fix a problem. I thought about
fixing the problem somewhere else. (Don't modify the wincon.d)
However, it still doesn't work.
Error 42: Symbol Undefined _D5win326wincon9CHAR_INFO6__initZ
There must be some way to use uninitialized variables :(

you're getting. :)
You are missing a symbol, the symbol you are missing is mangled in such
a way that it is clear that it is a D symbol, which means you have
defined CHAR_INFO as a D struct, instead of using extern (C) as I have
shown you above.
What dsource project is win32.wincon in? Perhaps CHAR_INFO isn't
declared as extern (C) in there...
FYI, you can allocate an array of CHAR_INFO structures without
initialising like this:
CHAR_INFO[500] abuffer = void;
this is a fixed length array however, perhaps not what you want?
Regan

Well, it really wasn't declared as extern(C). But I inserted it and declared
it as extern(C). Don't know why, but it still don't work.
Here is the dsource project:
http://dsource.org/projects/core32

I didn't want to write in orginal files to fix a problem. I thought about
fixing the problem somewhere else. (Don't modify the wincon.d)
However, it still doesn't work.
Error 42: Symbol Undefined _D5win326wincon9CHAR_INFO6__initZ
There must be some way to use uninitialized variables :(

you're getting. :)
You are missing a symbol, the symbol you are missing is mangled in such
a way that it is clear that it is a D symbol, which means you have
defined CHAR_INFO as a D struct, instead of using extern (C) as I have
shown you above.
What dsource project is win32.wincon in? Perhaps CHAR_INFO isn't
declared as extern (C) in there...
FYI, you can allocate an array of CHAR_INFO structures without
initialising like this:
CHAR_INFO[500] abuffer = void;
this is a fixed length array however, perhaps not what you want?
Regan

Well, it really wasn't declared as extern(C). But I inserted it and declared
it as extern(C). Don't know why, but it still don't work.
Here is the dsource project:
http://dsource.org/projects/core32

I didn't want to write in orginal files to fix a problem. I thought about
fixing the problem somewhere else. (Don't modify the wincon.d)
However, it still doesn't work.
Error 42: Symbol Undefined _D5win326wincon9CHAR_INFO6__initZ
There must be some way to use uninitialized variables :(

you're getting. :)
You are missing a symbol, the symbol you are missing is mangled in such
a way that it is clear that it is a D symbol, which means you have
defined CHAR_INFO as a D struct, instead of using extern (C) as I have
shown you above.
What dsource project is win32.wincon in? Perhaps CHAR_INFO isn't
declared as extern (C) in there...
FYI, you can allocate an array of CHAR_INFO structures without
initialising like this:
CHAR_INFO[500] abuffer = void;
this is a fixed length array however, perhaps not what you want?
Regan

I didn't want to write in orginal files to fix a problem. I thought about
fixing the problem somewhere else. (Don't modify the wincon.d)
However, it still doesn't work.
Error 42: Symbol Undefined _D5win326wincon9CHAR_INFO6__initZ
There must be some way to use uninitialized variables :(