On Thursday, 2 July 2015 at 12:19:06 UTC, Steven Schveighoffer
wrote:
On 7/2/15 8:10 AM, Nicholas Wilson wrote:
[...]
Try dmd -v, it will tell you the link line. Then you can try it
yourself to see how to get it to work. I know dmd has problems
with link line parameters, because it always puts Phobos
somewhere. But this is generally for libraries that Phobos
needs, not user code.
A full example may be useful too.
-Steve
linker command is
gcc test2.o -o test -m64 -L/usr/share/dmd/lib -L/usr/local/lib
-lgmp -lphobos2 -L/Users/nicholaswilson/d/lib/ -lphobos2
-lpthread -lm