On Mon, 20 Feb 2012 22:26:58 +0100, Mike Wey <mike-...@example.com> wrote:

On 02/20/2012 09:49 PM, simendsjo wrote:
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
....
I get the same error using gdc-4.6

The problem is that -ldl should appear after -lphobos2 in the arguments passed to gcc.


Ok, that removed the error (although I got another).
But how can I specify this when I run dmd or gdc? dmd and gdc adds -L options before phobos...

Reply via email to