importC with struct name and function conflict

Dakota dakota at gmail.com
Mon Aug 5 11:02:24 UTC 2024


On Saturday, 3 August 2024 at 11:55:53 UTC, Dennis wrote:
> On Saturday, 3 August 2024 at 05:10:37 UTC, Dakota wrote:
>> How can I get the function and type from importC?  is there a 
>> auto rename mechanism ?
>
> The most pragmatic workaround is to add a typedef to the C code:
>
> ```C
> int S;
> struct S { int a, b; };
> typedef struct S S_t;    // add this typedef
> ```
>
> https://dlang.org/spec/importc.html#tag-symbols

Thanks for tips.

This will not work for me.  (huge code base I can not change and 
maintain)


More information about the Digitalmars-d-learn mailing list