I've been reading the D Cookbook and near the beginning there's the following sentence:
D is binary compatible with C, but not source compatible.
SAS allows users to define and call C functions from within SAS. But I'm wondering, would it'd also be possible to do this from D?
I found Adam Ruppe's answer to create a DLL here, and I tried using that to create the DLL example from the SAS documentation; however, whenever I go to call it, the dll gets loaded, and then SAS proceeds to crash (without any crash log that I can find).
extern(Windows)like CyberShadow said. Just to clarify that sentence though, what I meant there was D can call or make functions callable from C, but it can't read C source code directly. Now, a lot of C code will also compile as D, and will mostly do the same thing, but there are some important details to check.externis one of them. Matching types and layouts are important too. Withintthat is easy, a C int and a D int are the same. But passing strings between C and D is a bit trickier so if you try to do that, it is likely to crash too.