Calling D function from C

Daniel Worthington daniel.worthington at
Mon Oct 11 21:10:31 PDT 2010

Linking with the phobos lib got it to compile, but I get a Bus Error when
running: EXC_BAD_ACCESS (SIGBUS). Playing with the code a bit and looking at
the crash reports, it looks like this happens whenever the D code tries to
allocate memory.

Do you think this is an issue of using dmd and gcc together? I'm on Mac OS


On Mon, Oct 11, 2010 at 6:17 PM, bearophile <bearophileHUGS at>wrote:

> Denis Koroskin:
> > You need to link with phobos.lib (because this is where writeln is
> defined
> > and implemented).
> And maybe use dmc instead of gcc if the compilation is done on Windows.
> Bye,
> bearophile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Digitalmars-d-learn mailing list