Calling D from C

CJS Prometheus85 at hotmail.com
Sat Nov 23 23:44:59 PST 2013


On Sunday, 24 November 2013 at 07:22:37 UTC, evilrat wrote:
> On Sunday, 24 November 2013 at 05:25:36 UTC, CJS wrote:
>> dmd -c foo.d
>> gcc bar.c foo.o
>
>
> ok i find out what's your problem. here is 2 ways of solving 
> this problem.
>
> 1) build like you do already but add to gcc call phobos lib, so 
> it will looks like "gcc bar.c foo.o 
> /usr/share/dmd/lib/libphobos2.a"
>
> 2) build with foo.d with "dmd foo.d -lib" which generates 
> proper lib file with all necessary stuff from phobos and 
> whatever.
>
> i specifically choose this order so you can think whats 
> happened.

That works. Thanks!


More information about the Digitalmars-d-learn mailing list