Bug 793 – OBJ file names conflict => linker error

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-01-04T11:24:00Z
Last change time
2014-02-15T13:13:34Z
Assigned to
bugzilla
Creator
nick.atamas

Comments

Comment #0 by nick.atamas — 2007-01-04T11:24:56Z
.obj files conflict when I use the -od flag to redirect intermediate output to a directory. Shouldn't obj files get the name of their package? So, sdl.timer.obj instead of just timer.obj. e.g. c:\proj> bud -odbin src/main.d [proj] |--[bin] \--[src] |--[A] | \--Timer.d | |--[sdl] | \--timer.d | \--main.d #imports and uses both timers This will cause a linker error because bin/Timer.obj will be overwritten by bin/timer.obj. Problem experienced on Windows. Should exist on all other OSes.
Comment #1 by bugzilla — 2007-01-04T12:36:47Z
This is working as designed. When you specify an output directory, that's where the output files should go.
Comment #2 by sean — 2007-01-04T12:45:18Z
[email protected] wrote: > > ..obj files conflict when I use the -od flag to redirect > intermediate output to a directory. Shouldn't obj files get the name of their > package? So, sdl.timer.obj instead of just timer.obj. > > e.g. > > c:\proj> bud -odbin src/main.d Try adding the -op option as well. This should preserve directory structure in bin. To link you'll have to perform a recursive search in bin for object files.
Comment #3 by nick.atamas — 2007-01-05T01:35:21Z
Adding -op seems to do nothing when used with Bud. When using dmd directly, using -op does fix the problem. I guess this issue should be raised with in Bud.