digitalmars.D - ImportC: Overriding standard search paths for C includes
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`?
Feb 27
On Wednesday, 28 February 2024 at 07:13:35 UTC, kdevel wrote:``` dmd -I(=)/tmp/dummyinclude test.d ```With `dmd -P=-I/tmp/dummyinclude test.d`.
Feb 28
On Wednesday, 28 February 2024 at 12:18:38 UTC, kinke wrote:On Wednesday, 28 February 2024 at 07:13:35 UTC, kdevel wrote:Thanks, works.``` dmd -I(=)/tmp/dummyinclude test.d ```With `dmd -P=-I/tmp/dummyinclude test.d`.
Mar 04