importC with struct name and function conflict

Dennis dkorpel at gmail.com
Sat Aug 3 11:55:53 UTC 2024


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


More information about the Digitalmars-d-learn mailing list