Calling D from C

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Sat Nov 23 22:48:44 PST 2013


On Sunday, 24 November 2013 at 05:54:44 UTC, evilrat wrote:
> On Sunday, 24 November 2013 at 05:25:36 UTC, CJS wrote:
>>
>> bash calls:
>> dmd -c foo.d
>> gcc bar.c foo.o
>>
>
> this is wrong. there should flag for building static lib which 
> should produce foo.a which then you link with C build.

There isn't anything special about .a files, they just contain 
multiple .o "collections"

He looks to be missing an initialization of the runtime, but then 
again thought I read something about a trick making that not 
needed (at least for dynamic loading)... Someone else will have 
to pitch in what the correct solution is.


More information about the Digitalmars-d-learn mailing list