To fix the linker order problem with cURL and Phobos2 in the D programming language, build your code like this (supposed your D source file is named source.d):
dmd source.d -L-lphobos2 -L-lcurl