[Issue 18066] duplicate symbol error when symbol is in a ".o" and a ".a" ; linker should accept it to allow partial recompilation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 12 10:36:53 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18066

--- Comment #4 from anonymous4 <dfj1esp02 at sneakemail.com> ---
Try to compile main_aux separately?
---
dmd -of=./build//app.o -c -g fun1.d fun2.d
dmd -of=./build//main.o -c -g main_aux.d
libtool -static ./build//app.o ./build//main.o -o ./build//libapp.a
dmd -of=./build//app -g -L./build//libapp.a main_aux.d
---
Usually linker can't omit symbols selectively from one object file, so you
should compile to separate object files, what dmd -lib does - that's why it
works.
btw what is // ?

--


More information about the Digitalmars-d-bugs mailing list