Compile without standard library
Timo Sintonen via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Sat Nov 21 00:14:47 PST 2015
On Friday, 20 November 2015 at 21:54:12 UTC, Ragmaanir wrote:
> i want to compile D-code for an experimental OS.
> But when i run the build script i get several
> compilation/linkage errors:
> It looks like this is some d-internal stuff. What can i do to
> fix this? I have written some of my experiments in c++
> previously and that works, but i want to port it to D because i
> think i will be more productive and less annoyed by the syntax.
> But this problem blocks me from doing so and i'm not sure about
> how to fix that.
You can not use D without the runtime library.
You can make an empty library and add required functions. Look at
Mikes examples at https://github.com/jinshil. With this you can
write C like programs but you can not for example have any oo
related things like classes.
To use more D features you need a modified runtime, something
like mine at https://bitbucket.org/timosi/minlibd.
These projects are both for Arm microcontrollers and gdc but you
get the idea.
More information about the digitalmars-d-ldc