www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dmd -nodefaultlibs?

reply Jonathan Marler <johnnymarler gmail.com> writes:
Is there a way to prevent dmd from adding any default libraries 
to its linker command?

Something equivalent to "-nodefaultlibs" from gcc? 
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

I'd still like to use the dmd.conf file, so I don't want to use 
"-conf="
May 21 2019
next sibling parent Max Haughton <maxhaton gmail.com> writes:
On Tuesday, 21 May 2019 at 21:48:22 UTC, Jonathan Marler wrote:
 Is there a way to prevent dmd from adding any default libraries 
 to its linker command?

 Something equivalent to "-nodefaultlibs" from gcc? 
 https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

 I'd still like to use the dmd.conf file, so I don't want to use 
 "-conf="
-betterC ?
May 21 2019
prev sibling parent Adam D. Ruppe <destructionator gmail.com> writes:
On Tuesday, 21 May 2019 at 21:48:22 UTC, Jonathan Marler wrote:
 Is there a way to prevent dmd from adding any default libraries 
 to its linker command?
dmd -defaultlib= yourfile.d Note it is = then nothing; you set it to a null library. Then it will not link any D library. that takes the D library out, but it will still try to link some C libs. I believe the only way to exclude them too is to compile and link separately. read more here: http://dpldocs.info/this-week-in-d/Blog.Posted_2019_02_25.html#no-runtime-d
May 21 2019