Wrong method called.

Brad Roberts braddr at puremagic.com
Sat Mar 4 14:40:30 PST 2006


On Sat, 4 Mar 2006, alan wrote:

> In article <ducnmk$rv$4 at digitaldaemon.com>, Walter Bright says...
> >
> >It's not a bug. The order in the import file *must* match the order in the 
> >import's compiled object file. In the example presented, the order in the 
> >import file is changed (via a command line switch) to be different from what 
> >it was in the object file. 
> >
> >
> 
> dmd b.d a.d -c
> 
> dmd main.d a.obj b.obj
> Error: AssertError Failure a.d(5)
> 
> dmd main.d b.obj a.obj
> Error: AssertError Failure a.d(5)
> 
> ============================================
> 
> dmd a.d b.d -c
> 
> dmd main.d a.obj b.obj
> Bar.bar()
> 
> dmd main.d b.obj a.obj
> Bar.bar()
> 
> ============================================
> 
> dmd main.d a.d b.d
> Bar.bar()
> 
> dmd main.d b.d a.d
> Bar.bar()
> 
> 
> OK, it's not a bug, it's a feature! I believe we now know why compiling object
> modules seperately causes problems. Walter, I think you have a big problem here.

Careful.. don't confuse the original topic here with a different topic.  
The start of this is changing a module such that it doesn't match the 
.obj/.o being linked in.  Your example is order of linking.  If you lie to 
the compiler about the contents of the compiled code by changing the 
header, you're out of luck in general.

Later,
Brad



More information about the Digitalmars-d-bugs mailing list