Thread overview
Default libraries by dmd
Aug 25, 2011
Cleem
Aug 25, 2011
Jonathan M Davis
Aug 25, 2011
Jesse Phillips
August 25, 2011
What libraries are linked by command dmd as linker? I want to use g++
as linker and link phobos2 and druntime libraries. But there are some
undefined references, for example:
_D3std4conv13ConvException7__ClassZ
_D3std4conv16__T5parseTlTAyaZ5parseFKAyaZl
_D3std5ascii7isDigitFNaNbNfwZb
_d_arraysetcapacity
and many others.
However when I use dmd for linking, I get success.
Linux. DMD v2.054.
August 25, 2011
On Thursday, August 25, 2011 04:46:11 Cleem wrote:
> What libraries are linked by command dmd as linker? I want to use g++
> as linker and link phobos2 and druntime libraries. But there are some
> undefined references, for example:
> _D3std4conv13ConvException7__ClassZ
> _D3std4conv16__T5parseTlTAyaZ5parseFKAyaZl
> _D3std5ascii7isDigitFNaNbNfwZb
> _d_arraysetcapacity
> and many others.
> However when I use dmd for linking, I get success.
> Linux. DMD v2.054.

Looke at dmd.conf. It should be in the same directory as dmd.

- Jonathan M Davis
August 25, 2011
On Thu, 25 Aug 2011 04:46:11 +0000, Cleem wrote:

> What libraries are linked by command dmd as linker? I want to use g++ as
> linker and link phobos2 and druntime libraries. But there are some
> undefined references, for example:
> _D3std4conv13ConvException7__ClassZ
> _D3std4conv16__T5parseTlTAyaZ5parseFKAyaZl
> _D3std5ascii7isDigitFNaNbNfwZb
> _d_arraysetcapacity
> and many others.
> However when I use dmd for linking, I get success. Linux. DMD v2.054.

dmd -v main.d
...
gcc main.o -o main -m64 -Xlinker --export-dynamic -lrt -Xlinker --no-warn-
search-mismatch -lphobos2 -lpthread -lm