www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Default libraries by dmd

reply Cleem <klimroot mail.ru> writes:
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.
Aug 24 2011
next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
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
Aug 24 2011
prev sibling parent Jesse Phillips <jessekphillips+d gmail.com> writes:
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
Aug 24 2011