On 20/02/2025 10:58 PM, Danny Arends wrote:
On Wednesday, 19 February 2025 at 15:53:02 UTC, ryuukk_ wrote:

Nuklear works with D (ImportC) out of the box, you don't need any binding, that's what i'm using in my game

nk.c
```
// add other configs you need
#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
#define NK_IMPLEMENTATION
#include "nuklear.h"
```

app.d
```D
import nk;
```

Then the examples are 1:1, C/D is the same


Stick to simplicity, and get rewarded for it

Thanks for the heads up, unfortunately including the nuklear_sdl_vulkan.h doesn't seem to work out of the box with ImportC and causes all kinds of compilation errors:

```
/usr/lib/gcc/x86_64-linux-gnu/9/include/bmi2intrin.h(86,21): Error: unsigned __int128 not supported /usr/lib/gcc/x86_64-linux-gnu/9/include/sgxintrin.h(141,3): Error: found `else` without a corresponding `if` statement /usr/lib/gcc/x86_64-linux-gnu/9/include/sgxintrin.h(174,3): Error: no type for declarator before `return` /usr/lib/gcc/x86_64-linux-gnu/9/include/sgxintrin.h(175,1): Error: no type for ../Nuklear/demo/sdl_vulkan/nuklear_sdl_vulkan.h(442,46): Error: expression expected, not `)` ../Nuklear/demo/sdl_vulkan/nuklear_sdl_vulkan.h(442,47): Error: found `malloc` when expecting `)`
```

Seems I will have to wait for betterC to become better at C, Is there a formal way of report these errors ?

That's not -betterC, that's ImportC, different feature.

This one has a similar report: https://github.com/dlang/dmd/issues/20470

Reply via email to