Thread overview | |||||
---|---|---|---|---|---|
|
June 08, 2013 Derelict linking (Debian + derelict + dmd 2.062) | ||||
---|---|---|---|---|
| ||||
Hi! I am trying to add SDL support to my project. libderelict-dev installed into my Debian and I am just added "import derelict.sdl2.sdl;". And caused: dmd -I/usr/include/dmd/ -unittest -g -debug -debug=osmpbf -L-lDerelictUtil -L-lDerelictSDL2 -L-ldl -ofmain libosmpbfd.a math/rtree2d.d math/geometry.d math/graph.d pb_encoding.d main.d /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.data+0x60): undefined reference to `_D8derelict4util6loader15SharedLibLoader7__ClassZ' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.rodata+0x41f0): undefined reference to `_D8derelict4util6loader15SharedLibLoader4loadMFZv' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.rodata+0x41f8): undefined reference to `_D8derelict4util6loader15SharedLibLoader4loadMFAyaZv' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.rodata+0x4200): undefined reference to `_D8derelict4util6loader15SharedLibLoader4loadMFAAyaZv' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.rodata+0x4208): undefined reference to `_D8derelict4util6loader15SharedLibLoader6unloadMFZv' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.rodata+0x4210): undefined reference to `_D8derelict4util6loader15SharedLibLoader8isLoadedMFNdZb' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.rodata+0x4220): undefined reference to `_D8derelict4util6loader15SharedLibLoader10loadSymbolMFAyaZPv' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.rodata+0x4228): undefined reference to `_D8derelict4util6loader15SharedLibLoader3libMFNdZS8derelict4util9sharedlib9SharedLib' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o):(.rodata+0x4230): undefined reference to `_D8derelict4util6loader15SharedLibLoader8bindFuncMFPPvAyabZv' /usr/lib/x86_64-linux-gnu/libDerelictSDL2.a(sdl_1_698.o): In function `_D8derelict4sdl23sdl18DerelictSDL2Loader6__ctorMFZC8derelict4sdl23sdl18DerelictSDL2Loader': ../derelict/sdl2/sdl.d:(.text._D8derelict4sdl23sdl18DerelictSDL2Loader6__ctorMFZC8derelict4sdl23sdl18DerelictSDL2Loader+0x1b): undefined reference to `_D8derelict4util6loader15SharedLibLoader6__ctorMFAyaZC8derelict4util6loader15SharedLibLoader' collect2: error: ld returned 1 exit status --- errorlevel 1 make: *** [main] Error 1 What is it? Can anyone help? |
June 08, 2013 Re: Derelict linking (Debian + derelict + dmd 2.062) | ||||
---|---|---|---|---|
| ||||
Posted in reply to mimi | On Saturday, 8 June 2013 at 00:27:36 UTC, mimi wrote:
> Hi!
>
> I am trying to add SDL support to my project. libderelict-dev installed into my Debian and I am just added "import derelict.sdl2.sdl;". And caused:
>
> dmd -I/usr/include/dmd/ -unittest -g -debug -debug=osmpbf -L-lDerelictUtil -L-lDerelictSDL2 -L-ldl -ofmain libosmpbfd.a
Looks like a problem with the order in which the libraries are specified on the command line. Swap them like so: "-L-lDerelictSDL2 -L-lDerelictUtil" and see if that does it for you.
|
June 08, 2013 Re: Derelict linking (Debian + derelict + dmd 2.062) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | Thanks! It worked!
On Saturday, 8 June 2013 at 03:44:22 UTC, Mike Parker wrote:
> On Saturday, 8 June 2013 at 00:27:36 UTC, mimi wrote:
>> Hi!
>>
>> I am trying to add SDL support to my project. libderelict-dev installed into my Debian and I am just added "import derelict.sdl2.sdl;". And caused:
>>
>> dmd -I/usr/include/dmd/ -unittest -g -debug -debug=osmpbf -L-lDerelictUtil -L-lDerelictSDL2 -L-ldl -ofmain libosmpbfd.a
>
> Looks like a problem with the order in which the libraries are specified on the command line. Swap them like so: "-L-lDerelictSDL2 -L-lDerelictUtil" and see if that does it for you.
|
Copyright © 1999-2021 by the D Language Foundation