Last update January 17, 2007

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.

JohnFletcher


Adding -lstdc++ and -lpthread should do the trick. Also, adding them to the DFLAGS environment variable should work. (on Windows/DMD, at least)

AndyFriesen


Maybe it would be better if dmd used the CXX or CC environment variable for linking.

ThomasKühne

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: January 17, 2007 22:37 (diff))