Link Problem

davidl davidl at 126.com
Thu Apr 2 04:29:35 PDT 2009


在 Thu, 02 Apr 2009 19:16:10 +0800,Qian Xu <quian.xu at stud.tu-ilmenau.de>  
写道:

> Hi All,
>
> Someone has reported the issue here
> (http://d.puremagic.com/issues/show_bug.cgi?id=1508)
>
> Someone pointed, that the problem can be solved by changing the order of
> object files. And this issue has been fixed in dmd.
>
> I have the same problem by linking an executable using gdc.
> Because my project cannot migrate to dmd immediately.
> So I want to change the order of object files.
> I have tried serveral combinations. But not get it done. (I have 380  
> object
> files)
>
> Can someone explain, what kind of a problem with compiler is this
> specificly?
>
>
> Best regards
> --Qian
>
>

You're sure that's a linking problem?
GDC only use DMD frontend, so if it's a linking problem it should be ld's.

LD seems to behave absurdly that it expects to resolve symbols.
e.g.
a.o provides symbol c, and b.o needs symbol c
you'd better feed ld with: b.o a.o not a.o b.o

Though you have that amount of files, the effort of tweaking orders just  
wastes your time. Try to make your code dmd compatible and try dmd!



More information about the Digitalmars-d mailing list