1
votes

Can someone point me to a good tutorial of how to call C code from D ( and possibly to call a FORTRAN library from D)?

I've researched the topic online and keep finding incomplete examples. I would like someone to spell it out for me one time. For example, show some example bindings and explain the steps to compiling and linking them to work together.

I have both the DMD and GDC compilers on windows.

Some background: Programming isn't my main job, but I do it A LOT at work. I work with Python and Java a lot, my first language was C, and I've done some web programming too. For my next project I'd like to use D, as it seems the learning curve is much lower than C++. Also I want a compiled language, and I've never mixed two languages before.

2
It is unbelievable how antisocial people on SO are... Why voting to close this thread?? It is a perfectly good and polite question... - DejanLekic

2 Answers

0
votes

have a look to Derelict.org, it contains dozen of C bindings using and (run-time loading and delegate assignation.)

0
votes

Deimos is a huge repository of bindings and wrappers of C libraries to D. I suggest you take a look at some small binding, and see how people did it.