modules && type inheritance?

BCS BCS at pathlink.com
Mon Jun 26 14:41:49 PDT 2006


MM wrote:
>>import the structures module in any module that will need to use them
>>
>>
>><code name="structs.d">
>>struct foo{int i;}
>></code>
>>
>><code name="other.d">
>>import structs;
>>
>>void main()
>>{
>> foo bar;
>> bar.i = 3;
>> return;
>>}
>></code>
>>
> 
> Thx for the reply, and sorry for my ambigious question :)
> 
> I import like this:
> 
> import std.string;
> import std.c.stdio;
> 
> import derelict.util.exception;
> import derelict.opengl.gl;
> import derelict.sdl.sdl;
> import derelict.sdl.image;
> import derelict.opengl.glu;
> 
> import structures;
> 
> And get this error:
> structures.d(19): identifier 'GLubyte' is not defined
> 
> 
"structures.d" will need to import anything that it needs, so find which 
derelict import defines GLubyte and add an import line for it in 
structures.d.



More information about the Digitalmars-d-learn mailing list