digitalmars.D.learn - Can't compile with 2 packages with the same name (in different modules)
- Alexandr (6/6) Mar 28 2008 Hello to all!
- Milke Wey (6/14) Mar 28 2008 You can try the -op switch:
- Unknown W. Brackets (5/21) Mar 28 2008 I always wonder why this isn't the default.... sure cluttering dirs up
- bearophile (4/7) Mar 29 2008 I agree.
- Simen Kjaeraas (9/28) Mar 29 2008 =
- Bill Baxter (3/11) Mar 29 2008 DSSS/rebuild does that.
- Alexandr (3/35) Mar 30 2008 can't understand you, be please more explicit
- Derek Parnell (27/34) Mar 30 2008 It might be a useful option for the D compiler to name the generated obj...
Hello to all! like wrote in subj i can't do this =) here it is code: http://paste.dprogramming.com/dpi75yap i need compiling (not rebuild, dsss, etc) thanks for your help!
Mar 28 2008
On Fri, 2008-03-28 at 03:21 -0400, Alexandr wrote:Hello to all! like wrote in subj i can't do this =) here it is code: http://paste.dprogramming.com/dpi75yap i need compiling (not rebuild, dsss, etc) thanks for your help!You can try the -op switch: dmd main.d module1/myclass.d module2/myclass.d -op it should put the object files in the same directory as the source files. so the first myclass.o doesn't get overridden by the second one. -- Mike Wey
Mar 28 2008
I always wonder why this isn't the default.... sure cluttering dirs up with object files is bad but I'd rather have it be the default than make people confused.... -[Unknown] Milke Wey wrote:On Fri, 2008-03-28 at 03:21 -0400, Alexandr wrote:Hello to all! like wrote in subj i can't do this =) here it is code: http://paste.dprogramming.com/dpi75yap i need compiling (not rebuild, dsss, etc) thanks for your help!You can try the -op switch: dmd main.d module1/myclass.d module2/myclass.d -op it should put the object files in the same directory as the source files. so the first myclass.o doesn't get overridden by the second one.
Mar 28 2008
Unknown W. Brackets:I always wonder why this isn't the default.... sure cluttering dirs up with object files is bad but I'd rather have it be the default than make people confused....I agree. Bye, bearophile
Mar 29 2008
On Sat, 29 Mar 2008 01:51:40 +0100, Unknown W. Brackets = <unknown simplemachines.org> wrote:I always wonder why this isn't the default.... sure cluttering dirs up==with object files is bad but I'd rather have it be the default than ma=ke =people confused.... -[Unknown] Milke Wey wrote:On Fri, 2008-03-28 at 03:21 -0400, Alexandr wrote:Hello to all! like wrote in subj i can't do this =3D) here it is code: http://paste.dprogramming.com/dpi75yap i need compiling (not rebuild, dsss, etc) thanks for your help!You can try the -op switch: dmd main.d module1/myclass.d module2/myclass.d -op it should put the object files in the same directory as the source =e.files. so the first myclass.o doesn't get overridden by the second on=Following the D module naming might be better, no? i.e module1/myclass.d =3D> module1.myclass.obj. Of course, this might lead to problems with very long file names. -- Simen
Mar 29 2008
Simen Kjaeraas wrote:thanks for your help!You can try the -op switch: dmd main.d module1/myclass.d module2/myclass.d -op it should put the object files in the same directory as the source files. so the first myclass.o doesn't get overridden by the second one.Following the D module naming might be better, no? i.e module1/myclass.d => module1.myclass.obj. Of course, this might lead to problems with very long file names.DSSS/rebuild does that. --bb
Mar 29 2008
Simen Kjaeraas Wrote:On Sat, 29 Mar 2008 01:51:40 +0100, Unknown W. Brackets <unknown simplemachines.org> wrote:can't understand you, be please more explicit PS: with -op works, thanks a lot!I always wonder why this isn't the default.... sure cluttering dirs up with object files is bad but I'd rather have it be the default than make people confused.... -[Unknown] Milke Wey wrote:Following the D module naming might be better, no? i.e module1/myclass.d => module1.myclass.obj. Of course, this might lead to problems with very long file names. -- SimenOn Fri, 2008-03-28 at 03:21 -0400, Alexandr wrote:Hello to all! like wrote in subj i can't do this =) here it is code: http://paste.dprogramming.com/dpi75yap i need compiling (not rebuild, dsss, etc) thanks for your help!You can try the -op switch: dmd main.d module1/myclass.d module2/myclass.d -op it should put the object files in the same directory as the source files. so the first myclass.o doesn't get overridden by the second one.
Mar 30 2008
On Sun, 30 Mar 2008 05:24:51 -0400, Alexandr wrote:Simen Kjaeraas Wrote:Following the D module naming might be better, no? i.e module1/myclass.d => module1.myclass.obj. Of course, this might lead to problems with very long file names. -- Simencan't understand you, be please more explicitIt might be a useful option for the D compiler to name the generated object files based on the source file's package and module names. For instance if you have two source files of the same name but in different directories, and thus in different packages, you could have 'module' statements such as ... module package1.modulename; in one source file and ... module package2.modulename; in the other source file. Then the compiler could generate the object files in a single output directory as ... package1.modulename.obj package2.modulename.obj However this method is not problem free. One problem is that the object file names could be longer than is currently done, and this could be an issue for the command line and other buffer-size constraints in the linker and executable file format. Another issue is that the 'module' statement is optional and often it is omitted. The compiler would then do exactly as is done now ... create two object files with the same name into the same directory. Maybe this could be reduced if it uses the commandline file paths as 'package' names if a module statement is missing??? dmd package1/modulename.d package2/modulename.d -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Mar 30 2008