Link problem with Derelict3
moechofe
truc at moechofe.com
Mon Jul 22 11:07:28 PDT 2013
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");
void main()
{
DerelictSDL2.load();
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
}
Here is the command line extracted using the --verbose argument,
that produce the error:
gcc main.o -o main -m32 -L/home/martin/Derelict3/lib/dmd
-L/usr/lib/i386-linux-gnu -L/usr/lib/x86_64-linux-gnu -Xlinker
--no-warn-search-mismatch -Xlinker --export-dynamic
-lDerelictSDL2 -lDerelictUtil -ldl -l:libphobos2.a -lpthread -lm
-lrt
I got the official ubuntu package from the dlang.org and try on 4
differents computer. It only works on Windows.
How I can solve this, please?
More information about the Digitalmars-d-learn
mailing list