RejectedSoftware Forums

Sign up

Binary works when compiled with DMD but not Dub


I'm pretty new to D and dub but very much enjoying it so far.

However, I have stumbled across a very confusing issue.

Compiling this code directly with dmd works beautifully, and I have no issues running the binary.

import std.stdio;

void main()
	auto content = get("");

running dub init curltest and putting that code in app.d
and then running dub run or dub build (--compiler dmd) results in : Couldn't resolve host name on handle 560A092C2850

This makes it seem like dub (somehow) uses its own libaries or maybe needs configuration to allow curl?

If someone could enlighten me and/or point me in the right direction I'd be very grateful.

Re: Binary works when compiled with DMD but not Dub

Quick correction: If I do dub build and then manually run the binary it works fine too.

So, the issue is the dub run command.