Linking from source-code
Adam D. Ruppe
destructionator at gmail.com
Thu Nov 14 07:00:18 PST 2013
On Thursday, 14 November 2013 at 13:49:02 UTC, Andrea Fontana
wrote:
> I think it's a better idea to make it works from dmd/rdmd.
pragma(lib) works almost everywhere with dmd*.... except phobos,
due to how that is compiled.
rdmd ignores modules in the std namespace when building the
dependency list, so dmd only sees the std.net.curl as a header
import, and doesn't pass on the library.
If you did dmd main.d dmd2/src/phobos/std/net/curl.d, it would
work, but not just dmd main.d where it finds phobos automatically.
* pragma(lib) doesn't work on ldc and gdc last i heard though.
But, I put the blame here on phobos being compiled as a .lib
without curl built in.
More information about the Digitalmars-d-learn
mailing list