Thread overview | ||||||
---|---|---|---|---|---|---|
|
November 15, 2004 Compiling graphics.graphics | ||||
---|---|---|---|---|
| ||||
I have a module "main.d" in which I import: import std.c.windows.windows; import graphics.graphics; and my source tree looks like this (brackets indicate directories): [src] main.d [graphics] graphics.d When I attempt to compile main.d: dmd main graphics\graphics graphics\graphics.d: module graphics module and package have the same name This error message seems unusual, since windows.d has the same name as package windows. However, I tried changing the package name to: import std.c.windows.windows; import gfx.graphics; and changed the source tree to: [src] main.d [gfx] graphics.d When I attempt to compile: dmd main gfx\graphics main.d(9): module graphics is in multiply defined I'm confused how this should be done. What is the appropriate argument syntax to compile main.d with dmd? Can graphics.d be in a package called graphics? Thanks, Garett |
November 15, 2004 Re: Compiling graphics.graphics | ||||
---|---|---|---|---|
| ||||
Posted in reply to news.digitalmars.com | In article <cnb3tu$kg0$1@digitaldaemon.com>, news.digitalmars.com says... > > main.d(9): module graphics is in multiply defined it might not be it but make sure you have the module definition on all source files, like: module something; that help the compiler to figure out what is the real problem. if you try it, please let us know if it was that. Ant |
November 15, 2004 Re: Compiling graphics.graphics | ||||
---|---|---|---|---|
| ||||
Posted in reply to news.digitalmars.com | On Mon, 15 Nov 2004 14:36:36 -0600, news.digitalmars.com <gtbass@studiotekne.com> wrote: > I have a module "main.d" in which I import: > > import std.c.windows.windows; > import graphics.graphics; > > and my source tree looks like this (brackets indicate directories): > > [src] > main.d > [graphics] > graphics.d > > When I attempt to compile main.d: > > dmd main graphics\graphics > graphics\graphics.d: module graphics module and package > have the same name > > This error message seems unusual, since windows.d has the same name as > package windows. However, I tried changing the package name to: > > import std.c.windows.windows; > import gfx.graphics; > > and changed the source tree to: > > [src] > main.d > [gfx] > graphics.d > > When I attempt to compile: > > dmd main gfx\graphics > main.d(9): module graphics is in multiply defined > > I'm confused how this should be done. What is the appropriate argument > syntax to compile main.d with dmd? Can graphics.d be in a package called > graphics? I suspect graphics.d contains "module graphics.graphics;" and changing that to "module gfx.graphics;" would fix it. Regan -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ |
November 15, 2004 Re: Compiling graphics.graphics | ||||
---|---|---|---|---|
| ||||
Posted in reply to news.digitalmars.com | As per Ant's suggestion, I added the following to the top of "graphics.d": module graphics.graphics; That solved my problem! Many thanks, Garett |
Copyright © 1999-2021 by the D Language Foundation