Feature Request List /
Linux Link Option
Challenge:
I want, under Linux, to be able to link code compiled with dmd to code compiled with g++. At present the link action uses gcc and this means that not all the libraries needed are loaded.
Suggestion:
dmd -c++ (or -g++) hello.d whatever.o
should mean that the link step uses g++. Default action should be unchanged.
Reference: NG:D.gnu/673
Reason:
I want to be able to make use of the SWIG interface to integrate some C++ classes into D. See DwithSwig and AndyFriesen's web page for details of this.
Adding -lstdc++ and -lpthread should do the trick. Also, adding them to the DFLAGS environment variable should work. (on Windows/DMD, at least)
Maybe it would be better if dmd used the CXX or CC environment variable for linking.