D modules referenced by C source?

Denis Koroskin 2korden at gmail.com
Wed May 6 23:34:52 PDT 2009


On Thu, 07 May 2009 03:02:16 +0400, Matt <webwraith at fastmail.fm> wrote:

> Hi, I apologise if this has already been asked, but I haven't gone and  
> DLed a news reader yet, so Firefox keeps complaining every time I try to  
> use the search box.
>
> I was planning to include some C source into a D project, and was  
> happily writing the D module for the "header" for the source, when I ran  
> into a little problem. I want to include some const values in the  
> module, which made me realize I don't know how to include the module in  
> the C source. I can see how it would work from the D side of the  
> compilation, but how would I go about making the const values visible to  
> the C code? Do I just #include "d_module.d"? Or is there a different way  
> to do this? What would the compilation process look like for this?
>
> Thank you in advance for any help you can provide.

Did you try htod? http://www.digitalmars.com/d/2.0/htod.html
There is also BCD http://www.dsource.org/projects/bcd

Try both tools and let us know if it helped.




More information about the Digitalmars-d mailing list