Justin Whear <[email protected]> wrote: > On Mon, 22 Jul 2013 20:07:28 +0200, moechofe wrote: > >> Hi, >> >> I have a problem when I try to compile Derelict3 under linux. I try >> different orders of the linked libraries without success. >> >> I've got this error: >> >> /home/martin/Derelict3/lib/dmd/libDerelictSDL2.a(sdl_106_698.o):(.rodata > +0x3094): >> référence indéfinie vers « >> _D6object6Object8opEqualsMFC6ObjectC6ObjectZb » >> collect2: erreur: ld a retourné 1 code d'état d'exécution >> >> I'm using "pragma" instructions but it's the same with passing the >> "-L-l" argument to "dmd": >> >> Here is my little source file: >> >> module main; >> >> import std.stdio; >> import derelict.sdl2.sdl; >> >> pragma(lib,"dl"); >> pragma(lib,"DerelictSDL2"); >> pragma(lib,"DerelictUtil"); >> > > You should link dependencies _after_ the library which depends on them. > In particular, your pragmas should go in this order: > > pragma(lib,"DerelictSDL2"); > pragma(lib,"DerelictUtil"); > pragma(lib,"dl"); > > That said, your error looks like a problem between DerelictSDL and > phobos; make sure the derelict libraries have been compiled with the > same compiler version that you're trying to use.
Thanx, It works by putting "dl" at the end.
