How to set include paths of a c source in dub when using importc

Ferhat Kurtulmuş aferust at gmail.com
Sat Apr 13 22:13:53 UTC 2024


On Saturday, 13 April 2024 at 22:00:16 UTC, Ferhat Kurtulmuş 
wrote:
> On Saturday, 13 April 2024 at 21:41:41 UTC, Ferhat Kurtulmuş 
> wrote:
>> On Saturday, 13 April 2024 at 21:39:10 UTC, Ferhat Kurtulmuş 
>> wrote:
>>> On Saturday, 13 April 2024 at 21:21:24 UTC, Richard (Rikki) 
>>> Andrew Cattermole wrote:
>>>> [...]
>>>
>>> Another question how can one define a preprocessor var for a 
>>> c source from dub.json?
>>>
>>> for instance: c source has #ifdef ORT_DLL_IMPORT
>>>
>>> normally we do it like -D ORT_DLL_IMPORT
>>
>> ohh I found it: -P
>
> no this does not work:
>
> "dflags": ["-P=SOME_FLAG"],
>
> c1: fatal error C1083: Cannot open source file: 'SOME_FLAG': No 
> such file or directory

The docs need an example. I was too stupid to figure this out 
quickly. "-P-DORT_DLL_IMPORT"


More information about the Digitalmars-d-learn mailing list