importC with struct name and function conflict
Dennis
dkorpel at gmail.com
Mon Aug 5 11:35:56 UTC 2024
On Monday, 5 August 2024 at 11:02:24 UTC, Dakota wrote:
> This will not work for me. (huge code base I can not change
> and maintain)
You don't have to change the code where the type is defined per
se, you just need to put it in any C file that can access the C
symbol.
clib_helpers.c:
```C
#include<hugelibrary.h>
typedef struct S S_t;
```
app.d:
```
import clib_helpers;
S_t s;
```
More information about the Digitalmars-d-learn
mailing list