On Mon, 20 Feb 2012 21:41:45 +0100, simendsjo <simend...@gmail.com> wrote:


I've tried the following using dmd 58 and trunk - both -m64 on kubuntu.
Any idea what I'm doing wrong?

import std.loader;
void main(string[] args)
{
     auto res = ExeModule_Init();
     assert(res == 0);
     scope(exit) ExeModule_Uninit();
     auto mod = ExeModule_Load("./libtcod.so");
}

$ dmd-trunk -v -L-ldl so.d

gcc so.o -o so -m64 -ldl -Xlinker -L/home/simendsjo/code/dmd-trunk/build/lib64 -Xlinker -L/home/simendsjo/code/dmd-trunk/build/lib -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -lphobos2 -lpthread -lm -lrt /home/simendsjo/code/dmd-trunk/build/lib64/libphobos2.a(loader_ad5_5c6.o): In function `_D3std6loader15ExeModule_Load_FxAyaZPv': std/loader.d:(.text._D3std6loader15ExeModule_Load_FxAyaZPv+0x69): undefined reference to `dlopen' /home/simendsjo/code/dmd-trunk/build/lib64/libphobos2.a(loader_ad2_567.o): In function `_D3std6loader13record_error_FZv': std/loader.d:(.text._D3std6loader13record_error_FZv+0x7): undefined reference to `dlerror' /home/simendsjo/code/dmd-trunk/build/lib64/libphobos2.a(loader_ad7_707.o): In function `_D3std6loader18ExeModule_Release_FKPvZv': std/loader.d:(.text._D3std6loader18ExeModule_Release_FKPvZv+0x31): undefined reference to `dlclose' /home/simendsjo/code/dmd-trunk/build/lib64/libphobos2.a(loader_ad8_7dc.o): In function `_D3std6loader20ExeModule_GetSymbol_FKPvxAyaZPv': std/loader.d:(.text._D3std6loader20ExeModule_GetSymbol_FKPvxAyaZPv+0x2a): undefined reference to `dlsym'
collect2: ld returned 1 exit status
--- errorlevel 1


$ locate libdl
(...)
/lib/x86_64-linux-gnu/libdl-2.13.so
/lib/x86_64-linux-gnu/libdl.so.2
/lib32/libdl-2.13.so
/lib32/libdl.so.2
/usr/lib/x86_64-linux-gnu/libdl.a
/usr/lib/x86_64-linux-gnu/libdl.so
/usr/lib32/libdl.a
/usr/lib32/libdl.so
(...)

I get the same error using gdc-4.6

Reply via email to