Container access in std.container

Ishan Thilina ishanthilina at gmail.com
Tue Mar 29 01:38:06 PDT 2011


== Quote from Steven Wawryk (stevenw at acres.com.au)'s article
> Your environment looks wrong.  Note that
> /usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5
> is equivalent to
> /usr/include/d/4.3.5
> so I expect it can't find container.d
> On 29/03/11 04:54, Ishan Thilina wrote:
> > I am using DGC due to the problems I'm witnessing with DMD. I tried a similar
> > approach. But the following error comes.
> >
> > "
> >
> > structures.d:4: Error: module container cannot read file 'std/container.d'
> > import path[0] =
> > /usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5/x86_64-linux-gnu
> > import path[1] = /usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5
> >
> > "
> >
> > I dont know what is wrong. I'll try to compile in Windows and let you know.
> >
> > @David :
> >
> > Thanks for the clarifications :)

>structures.d:4: Error: module container cannot read file 'std/container.d'
>import path[0] =
>/usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5/x86_64-linux-gnu
>import path[1] = /usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5

Ok, now std.container can be imported inside windows. The problem has been that
windows has used dmd to compile rather than using dmd2.
But I get an error message. I think it's what davis said.

>On 2011-03-28 07:48, David Nadlinger wrote:
>> ---
>> import std.container;
>> import std.stdio;
>>
>> void main() {
>>      auto rb = redBlackTree(4, 1, 2, 3);
>>      foreach (e; rb) {
>>          writeln(e);
>>      }
>> }
>> ---

>I believe that the redBlackTree function is only in the git repository at
>present (so, it'll be in the next release), so if he's using dmd 2.052, that
>particular way of creating a RedBlackTree won't work.

So how can I declare a redBlackTree..?



It seems that there's no importing problem inside windows now. But the problem
still there in Linux. I'm using GDC to compile.


More information about the Digitalmars-d-learn mailing list