December 15, 2013 Compiling file with std.net.curl in Ubuntu 13.10 64bit | ||||
---|---|---|---|---|
| ||||
Hi all, I'm attempting to compile a file using dmd. Below is the code: import std.stdio; import std.net.curl; void main(){ writeln("hello world"); writeln(get("http://google.com")); } I found a few threads that indicate I needed to compile using the linker flags for phobos and curl, so the dmd command I used was: dmd -L-lphobos2 -L-lcurl hello.d Everything compiles without warning, but when I run the executable I get this error: "Fatal Error while loading '/usr/lib/x86_64-linux-gnu/libphobos2.so.0.64': The module 'std.regex' is already defined in './hello'. Segmentation fault (core dumped)" I read in a few places that static linking may solve this problem, but I am not sure what static linking is or how to use it. If someone could help me out I would much appreciate it! |
Copyright © 1999-2021 by the D Language Foundation