On Friday, 12 January 2024 at 11:06:39 UTC, Bkoie wrote:
On Thursday, 11 January 2024 at 15:18:08 UTC, Sergey wrote:
On Wednesday, 10 January 2024 at 23:36:33 UTC, JN wrote:
I would like to use ImportC to automatically import a C
header into my D project.
It was already done. Use it
On Thursday, 11 January 2024 at 15:18:08 UTC, Sergey wrote:
On Wednesday, 10 January 2024 at 23:36:33 UTC, JN wrote:
I would like to use ImportC to automatically import a C header
into my D project.
It was already done. Use it
https://code.dlang.org/packages/wgpu-d
Don't reinvent the wheel
You need to use a .c file that include it
--- webgpu.c
```c
#include "webgpu.h"
```
--- app.d
```d
import std.stdio;
import webgpu;
void main()
{
writeln(WGPUBlendFactor_Dst);
}
```
result:
```
$ dmd -run app.d webgpu.c
WGPUBlendFactor_Dst
```
On Wednesday, 10 January 2024 at 23:36:33 UTC, JN wrote:
I would like to use ImportC to automatically import a C header
into my D project.
It was already done. Use it https://code.dlang.org/packages/wgpu-d
Don't reinvent the wheel :)
I would like to use ImportC to automatically import a C header
into my D project. I've been using Dstep so far which works ok,
but requires some manual fixes to get the resulting D file to
compare and it doesn't let me to just drop the C header file.
I created a fresh dub project to try. I
On Friday, 4 March 2022 at 17:17:17 UTC, MoonlightSentinel wrote:
On Friday, 4 March 2022 at 01:30:00 UTC, Leonardo wrote:
Thanks but not worked here.
```
[leonardo@leonardo-pc dimportc]$ dmd --version
DMD64 D Compiler v2.098.1
```
Please retry with the
On Friday, 4 March 2022 at 01:30:00 UTC, Leonardo wrote:
Thanks but not worked here.
```
[leonardo@leonardo-pc dimportc]$ dmd --version
DMD64 D Compiler v2.098.1
Copyright (C) 1999-2021 by The D Language Foundation, All
Rights Reserved written by Walter Bright
[leonardo@leonardo-pc
On Friday, 4 March 2022 at 17:17:17 UTC, MoonlightSentinel wrote:
On Friday, 4 March 2022 at 01:30:00 UTC, Leonardo wrote:
Thanks but not worked here.
```
[leonardo@leonardo-pc dimportc]$ dmd --version
DMD64 D Compiler v2.098.1
```
Please retry with the
On Friday, 4 March 2022 at 01:30:00 UTC, Leonardo wrote:
Thanks but not worked here.
```
[leonardo@leonardo-pc dimportc]$ dmd --version
DMD64 D Compiler v2.098.1
```
Please retry with the
[beta](https://dlang.org/download.html#dmd_beta) or [nightly
On Friday, 4 March 2022 at 01:30:00 UTC, Leonardo wrote:
Thanks but not worked here.
```
[leonardo@leonardo-pc dimportc]$ dmd --version
DMD64 D Compiler v2.098.1
Copyright (C) 1999-2021 by The D Language Foundation, All
Rights Reserved written by Walter Bright
[leonardo@leonardo-pc
Thanks but not worked here.
```
[leonardo@leonardo-pc dimportc]$ dmd --version
DMD64 D Compiler v2.098.1
Copyright (C) 1999-2021 by The D Language Foundation, All Rights
Reserved written by Walter Bright
[leonardo@leonardo-pc dimportc]$ ls
foo.c program.d
[leonardo@leonardo-pc dimportc]$ cat
On Thursday, 3 March 2022 at 19:05:22 UTC, Leonardo wrote:
I saw the new feature called ImportC, it's cool to be able to
use C code/libraries, but I'm not much experience in C and
didn't understand this incomplete documentation:
https://dlang.org/spec/importc.html
How to use ImportC?
You
On Thursday, 3 March 2022 at 19:05:22 UTC, Leonardo wrote:
I saw the new feature called ImportC, it's cool to be able to
use C code/libraries, but I'm not much experience in C and
didn't understand this incomplete documentation:
https://dlang.org/spec/importc.html
How to use ImportC?
I
I saw the new feature called ImportC, it's cool to be able to use
C code/libraries, but I'm not much experience in C and didn't
understand this incomplete documentation:
https://dlang.org/spec/importc.html
How to use ImportC?
14 matches
Mail list logo