ImportC: Overriding standard search paths for C includes
kdevel
kdevel at vogtner.de
Wed Feb 28 07:13:35 UTC 2024
Given the C source `cmysql.c` containing just
```C
#include <mysql/mysql.h>
```
Assume on a Linux system there is not only
```
/usr/include/mysql/mysql.h (1)
```
but also
```
/tmp/dummyinclude/mysql/mysql.h (2)
```
In order to instruct gcc to include the second file I compile with
```
gcc -I /tmp/dummyinclude cmysql.c
```
Now I have a D file test.d containing only
```D
import cmysql;
```
How do I get ImportC to include (2)? On my machine
```
dmd -I(=)/tmp/dummyinclude test.d
```
always `lstat`s and `open`s `/usr/include/mysql/mysql.h`?
More information about the Digitalmars-d
mailing list