GDC can't link LuaD if separate compilation used (bug?)

ketmar via D.gnu d.gnu at puremagic.com
Sun Apr 27 03:05:27 PDT 2014


On Sun, 27 Apr 2014 10:27:37 +0100
"Iain Buclaw via D.gnu" <d.gnu at puremagic.com> wrote:

> Try compiling with -femit-templates to force the behaviour of D 
> prior
> to 2.064, see this bug report:
ah, just discovered the strange thing: if i pass hello.o after 
base.o
from LuaD, not before, everything is linking without any problems.
seems that gdc emits templates, but linker just don't know about 
their
existanse before it meets 'em (which is logical, but confusing -- 
this
means that i should add my libraries first and main .o file last; 
have
to fix my build tool for this case).

and i don't neet -femit-templates (actually, adding this flag 
changes
nothing at all, only linking order matters).


More information about the D.gnu mailing list