This C file fails to compile with ImportC on my system:
-------------------
#include <Python.h>
-------------------
The reason why is that `Python.h` is in `/usr/include/python3.11`. There's no way to tell the compiler to look for headers in specific directories.
Comment #1 by dkorpel — 2024-03-20T17:56:42Z
There is the `-P=<preprocessorflag>` option:
```
dmd -P-I/usr/include/python3.11
```
Comment #2 by atila.neves — 2024-03-20T18:07:52Z
I see. The -P flag doesn't show up in the man page.
Comment #3 by lance — 2024-03-20T18:34:26Z
To be honest, it's not that easy to find on this page either: https://dlang.org/spec/importc.html#manual-cpp
Under "Running the Preprocessor Automatically" it says "The -Ppreprocessorflag switch passes preprocessorflag to the preprocessor." It's not even searchable using that wording.
Comment #4 by robert.schadek — 2024-12-13T19:33:56Z