Strange linker problems

Benjamin Thaut code at benjamin-thaut.de
Mon Mar 18 04:25:08 PDT 2013


Am 18.03.2013 09:51, schrieb Johannes Pfau:
>
> Could it be this:
> http://stackoverflow.com/questions/8640642/gcc-link-order-changed
>
> Something changed in ld some time ago and the order in which libraries
> are passed to ld is now important. The library which defines
> _D6thBase2io8writeflnFAyaYm must be passed to ld first, the lib/object
> file using it second.
>

So this is a bug in gdc? Shouldn't gdc always pass the object files to 
the linker first? I noticed that if I change the build command to

gdc -m64 -g -fno-inline-functions -fdebug 
-I"C:\Users\Benjamin\Documents\d-projects\thBase\src\..\..\druntime\import" 
-I"C:\Users\Benjamin\Documents\d-projects\thBase\src\..\..\phobos" 
-fversion=NOGCSAFE -fversion=MEMORY_TRACKING -fdeps="Debug Lib 
GDC\thBase.dep" -nostdinc -O0 -c -o "Debug Lib GDC\thBase.obj" @"Debug 
Lib GDC\thBase.build.rsp"

It works correctly.

Thanks for the tip.

Kind Regards
Benjamin Thaut


More information about the D.gnu mailing list