On Saturday, 19 March 2016 at 08:10:41 UTC, Johan Engelen wrote:
On Friday, 18 March 2016 at 20:47:41 UTC, Walter Bright wrote:
On 3/18/2016 6:59 AM, Johan Engelen wrote:
It'd be nice to be able to call `dmd -ldflags` whose output would be the
standard linker flags.

  dmd -v file.d

will tell you what command is sent to the linker.

That linker command does not include the path to phobos.
You would have to parse the output, etc...

Would you accept a PR that adds `dmd -ldflags` ?

For C++/D linking, I used the C++ linker for LDC (master), but now I am changing it to using the D compiler with "-L-lstdc++" to link. It solves the issue of finding the location of phobos/druntime (different for dmd and ldc) and other required libs for D code. It also solves a Windows-specific linking problem when main() is in C++ code [1].

[1] http://forum.dlang.org/post/[email protected]

Reply via email to