www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [SAOC 2025] Improve importC Weekly Update #10

Hi everyone,

This week, I set up my testing suite with sdl2 because sdl3 has 
been a little complicated
with GitHub actions. I realized I needed to fix symbol 
duplications and macros that point to function returns.

I finally fixed symbol duplications in DMD. I realized DMD was 
already trying to handle that by marking duplicates as extern 
variables but it wasn't handling it well.

I had to ensure that

```
int a;
int a;
int a;
```
becomes
```
int a;
extern int a;
extern int a;
```

so we get only one symbol emitted in object file and that works 
without any complications.

Link to PR: 
https://github.com/dlang/dmd/pull/22003/commits/158e2455c3a0befd9ddb8d8e8906a421969cdf52
Nov 24