Compiling file with std.net.curl in Ubuntu 13.10 64bit
Ben
bencschulz at gmail.com
Sun Dec 15 12:16:53 PST 2013
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!
More information about the Digitalmars-d-learn
mailing list