DMD strips package names / paths when generating object file names for -lib. Then the only way to extract objects from such a lib is running the librarian multiple times, which is sometimes too slow.
I've attached an archive containing an example of this issue. There are two modules whose fully qualified names differ, but the last parts of their names are the same. Compiling them with -c -lib -op and running the librarian reveals that DMD produces two objects with the same name. Running lib -x the first time extracts only the first one. Removing the object via lib -d and running lib -x again extracts the second. I've included a .bat file which demonstrates this.
Comment #1 by h3r3tic — 2009-09-17T19:05:02Z
Created attachment 453
example
Attachment failed while submitting the issue.
Comment #2 by robert.schadek — 2024-12-13T17:50:39Z