www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Static compiling with dmd

reply "Zardoz" <luis.panadero gmail.com> writes:
How I can compile with static linking with dmd ?
I try with dmd -L-static ....
but i get this error :
/usr/bin/ld: cannot find -lgcc_s

I used before gdc with -static options and owrked well on it, but 
I need to use now dmd.
Dec 12 2012
next sibling parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Wednesday, December 12, 2012 15:28:46 Zardoz wrote:
 How I can compile with static linking with dmd ?
 I try with dmd -L-static ....
 but i get this error :
 /usr/bin/ld: cannot find -lgcc_s
 
 I used before gdc with -static options and owrked well on it, but
 I need to use now dmd.
At this point, you can't do it. You need to link manually using gcc if you want to do it. http://d.puremagic.com/issues/show_bug.cgi?id=6952 - Jonathan M Davis
Dec 12 2012
prev sibling parent "Minas Mina" <minas_mina1990 hotmail.co.uk> writes:
On Wednesday, 12 December 2012 at 14:28:48 UTC, Zardoz wrote:
 How I can compile with static linking with dmd ?
 I try with dmd -L-static ....
 but i get this error :
 /usr/bin/ld: cannot find -lgcc_s

 I used before gdc with -static options and owrked well on it, 
 but I need to use now dmd.
Try using -L-lyourlib
Dec 12 2012