On Wednesday, 11 June 2014 at 13:52:09 UTC, belkin wrote:
Question: How do I use it from D?
Write the prototype in your D file with extern(C): extern(C) int factorial(int n);then just call the function normally in D. Make sure you include all the C object files when you compile the D program too so it all links together.
