Calling D function from C

Daniel Worthington daniel.worthington at gmail.com
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
X.

Daniel

On Mon, Oct 11, 2010 at 6:17 PM, bearophile <bearophileHUGS at lycos.com>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: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20101011/1461f367/attachment-0001.html>


More information about the Digitalmars-d-learn mailing list