File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1919Posix systems (Linux, Mac OSX, FreeBSD, etc.)
2020---------------------------------------------
2121
22- $ dmd path/to/ddl.d /path/to/libdl.a -L-ldl your_module.d
22+ $ dmd path/to/ddl.d -L-ldl your_module.d
2323
24- Note, that libdl must be linked statically and dynamically.
24+ Note, that libdl must be also linked dynamically. It is linked already
25+ statically using pragma(lib, "dl").
2526
2627Windows
2728-------
@@ -39,8 +40,8 @@ your system.
3940Unfortunately the tests are not portable. So be prepared for seeing them fail on
4041your system.
4142
42- $ dmd -unittest -version=ddl -Ipath/to/ddl/tests /path/to/libdl.a -L-ldl path/to/ddl.d -run tests/test_c.d
43- $ dmd -unittest -version=ddl -Ipath/to/ddl/tests /path/to/libdl.a -L-ldl path/to/ddl.d -run tests/test_zmq.d
43+ $ dmd -unittest -version=ddl -Ipath/to/ddl/tests -L-ldl path/to/ddl.d -run tests/test_c.d
44+ $ dmd -unittest -version=ddl -Ipath/to/ddl/tests -L-ldl path/to/ddl.d -run tests/test_zmq.d
4445
4546Note this also runs ddl's unittests. Further, ``` -version=ddl ``` is needed to
4647verify the example in the [ documentation] ( http://jkm.github.com/ddl/ddl.html ) .
Original file line number Diff line number Diff line change @@ -230,7 +230,11 @@ import std.exception;
230230import std.conv ;
231231import std.path ;
232232import std.array ;
233- version (Posix ) import core.sys.posix.dlfcn ;
233+ version (Posix )
234+ {
235+ import core.sys.posix.dlfcn ;
236+ pragma (lib, " dl" ); // link statically
237+ }
234238version (Windows ) import core.sys.windows.windows , std.windows.syserror ;
235239debug import std.stdio ;
236240
You can’t perform that action at this time.
0 commit comments