https://forum.dlang.org/post/qpmqvhipfyyyehvoe...@forum.dlang.org
On Monday, 8 January 2024 at 23:00:02 UTC, Dennis wrote:
On Monday, 8 January 2024 at 21:56:10 UTC, Renato wrote:
but I tried exactly that! Which gives a seg fault.
Looks like there's a bug with the -H switch:
https://issues.dl
On Monday, 8 January 2024 at 23:00:02 UTC, Dennis wrote:
On Monday, 8 January 2024 at 21:56:10 UTC, Renato wrote:
but I tried exactly that! Which gives a seg fault.
Looks like there's a bug with the -H switch:
https://issues.dlang.org/show_bug.cgi?id=24326
That's the bug that is affecting m
On Monday, 8 January 2024 at 21:56:10 UTC, Renato wrote:
[snip]
Importing .h files from d files isn't supported yet because of
a dispute with the lookup priority:
https://issues.dlang.org/show_bug.cgi?id=23479
https://issues.dlang.org/show_bug.cgi?id=23547
Ah, too bad. Anyway, I was just pl
On Monday, 8 January 2024 at 21:56:10 UTC, Renato wrote:
but I tried exactly that! Which gives a seg fault.
Looks like there's a bug with the -H switch:
https://issues.dlang.org/show_bug.cgi?id=24326
But that shouldn't be necessary, you should just be able to
import the c file.
I also tried
On Monday, 8 January 2024 at 21:04:10 UTC, Dennis wrote:
On Monday, 8 January 2024 at 18:53:47 UTC, Renato wrote:
Perhaps using an intermediate C file to do this would work,
but I wanted to know if D can do it.
Yes, your best options are either:
- rename the .h to .c and edit it so the
`STB_
On Monday, 8 January 2024 at 19:17:06 UTC, Lance Bachmeier wrote:
On Monday, 8 January 2024 at 18:53:47 UTC, Renato wrote:
Is it possible to use C header-only libs from D?
In C, I would need to do this:
```c
#define STB_DS_IMPLEMENTATION
#include "stb_ds.h"
```
The definition must be done in
On Monday, 8 January 2024 at 18:53:47 UTC, Renato wrote:
Is it possible to use C header-only libs from D?
In C, I would need to do this:
```c
#define STB_DS_IMPLEMENTATION
#include "stb_ds.h"
```
The definition must be done in a single C file before including
the h file.
I tried this in D:
Is it possible to use C header-only libs from D?
In C, I would need to do this:
```c
#define STB_DS_IMPLEMENTATION
#include "stb_ds.h"
```
The definition must be done in a single C file before including
the h file.
I tried this in D:
```d
enum STB_DS_IMPLEMENTATION = 1;
import stb_ds;
```