As long as you have the sqlite3 development package installed, you can simply call dmd test.d -L-lsqlite3 - there is no need for an absolute path.
A good alternative is lib pragma:
pragma(lib, "sqlite3"); import std.stdio, std.string, etc.c.sqlite3; void main () { sqlite3* db; auto ret = sqlite3_open (toStringz("mydb.s3db"), &db); writeln (ret); }
With this, you can simply say dmd test.d
I cannot reproduce your problem using -ldl , but this can also be added as a pragma directive.
source share