Okay I'm definitely trying to use `importC` rather than the regular `extern(C)` way. I can see where I went wrong. The steps for importC for header files are:

1. Prepend the following directives to `test_og.c` or whatever your interface c script is:

```
#define __restrict restrict
#define __asm__ asm
#define __extension__
#define __inline
#define __builtin_bswap16
#define __builtin_bswap32
#define __builtin_bswap64
```

2. Run the commands:

```
gcc -E -P test_og.c > test_c.c
dmd test.d test_c.c && ./test
```

which works. Now I've tried the same thing with library `fftw3` and getting:

```
Error: undefined identifier `__float128`
```

Which I guess I have to define somehow in the original c directives?

Reply via email to