Re: std.int128 not working with -betterC enabled

2023-12-22 Thread Matheus Catarino via Digitalmars-d-learn
On Wednesday, 20 December 2023 at 18:16:00 UTC, Renato wrote: I wanted to write a small program using betterC that needs to use int128. This simple program works without -betterC: ```d module dasc; import std.int128; import core.stdc.stdio; extern (C): int main() { auto n = Int128(128, 12

sokol-d: Static Struct

2023-12-30 Thread Matheus Catarino via Digitalmars-d-learn
Hi everyone. 👋 Currently I'm working on D binding for sokol project (truly a dual bindgen [sokol-tools, sokol-header]) which could be merged into the upstream project. Up to now, my "ideal" configuration has been to run all the ported examples (from other supported bindings) on Drt or bett

Re: sokol-d: Static Struct

2023-12-30 Thread Matheus Catarino via Digitalmars-d-learn
Use https://renderdoc.org/ and check and compare frames for both your working and non-working example Nice!! I'll try. That'll give you an idea at what could be wrong I suspect you have a typo in one of your definition I don't doubt it. I'm experiencing D in just a week. (Newbie)😅 On Sa

Re: sokol-d: Static Struct

2024-01-03 Thread Matheus Catarino via Digitalmars-d-learn
On Saturday, 30 December 2023 at 20:20:50 UTC, ryuukk_ wrote: I suspect you have a typo in one of your definition I debugged some existing bindings, and despite any user-level errors (via code) there's some conflict between ABIs. In fact, it's mentioned by sokol's author below: I've been se

Re: sokol-d: Static Struct

2024-01-03 Thread Matheus Catarino via Digitalmars-d-learn
On Wednesday, 3 January 2024 at 18:57:44 UTC, ryuukk_ wrote: I managed to compile your project, ``sgl_context`` is working for me, it renders and roate [...] Wow! Cube and blend work, too? And on my machine it doesn't rotate, just like I initially posted. I had to remove this from y

Using C++ Classes From D: dmd cannot link, while ldc segfault

2024-01-25 Thread Matheus Catarino via Digitalmars-d-learn
https://forum.dlang.org/post/kawfhminmtmwbmkzh...@forum.dlang.org On Monday, 19 June 2023 at 06:11:59 UTC, mw wrote: LDC - the LLVM D compiler (1.32.2): ``` main.d(32): Error: undefined identifier `vector` in module `core.stdcpp.vector`, did you mean enum member `MIctor`? ``` So what's wrong

Re: Using C++ Classes From D: dmd cannot link, while ldc segfault

2024-01-26 Thread Matheus Catarino via Digitalmars-d-learn
On Friday, 26 January 2024 at 09:06:16 UTC, Emmanuel Danso Nyarko wrote: On Thursday, 25 January 2024 at 21:41:36 UTC, Matheus Catarino wrote: https://forum.dlang.org/post/kawfhminmtmwbmkzh...@forum.dlang.org On Monday, 19 June 2023 at 06:11:59 UTC, mw wrote: LDC - the LLVM D compiler (1.32.2)

Re: sokol-d: Static Struct

2024-02-02 Thread Matheus Catarino via Digitalmars-d-learn
On Saturday, 30 December 2023 at 19:27:08 UTC, Matheus Catarino wrote: Hi everyone. 👋 Currently I'm working on D binding for sokol project (truly a dual bindgen [sokol-tools, sokol-header]) which could be merged into the upstream project. Up to now, my "ideal" configuration has been to run

Interfacing with Rust

2024-10-04 Thread Matheus Catarino via Digitalmars-d-learn
https://forum.dlang.org/post/dudpbkerfrdlnggiz...@forum.dlang.org On Saturday, 1 October 2022 at 03:14:44 UTC, mw wrote: extern(C++)? Why do you think Rust export C++ linkage? Rust support [two mangling version](https://doc.rust-lang.org/rustc/symbol-mangling/index.html#mangling-versions) :

Re: translate alias align from C to D

2025-01-13 Thread Matheus Catarino via Digitalmars-d-learn
On Monday, 13 January 2025 at 11:36:45 UTC, Dakota wrote: I want tranlate this into d without importC, what is the best way to do it? You could simply use dstep or dmd/ldc2 `-H`|`-Hf=`. My test on linux shows that both can translate/convert the file. Although there are differences such as:

Re: Is this dub link flag (-L-lcudart_static) a bug?

2025-05-16 Thread Matheus Catarino via Digitalmars-d-learn
On Monday, 12 May 2025 at 15:03:00 UTC, mw wrote: I got a link error: `undefined reference to 'cudaGetDeviceProperties_v2'`. by adding `--vverbose` dub option, I found the final expanded link cmd is: ``` .../ldc2/bin/ldc2 ... -L-L/usr/local/cuda/lib64 -L-lcudart_static ... ``` This "-L-