Re: Need help with Windows linkage ( DMD using ImportC)

2024-03-09 Thread Carl Sturtivant via Digitalmars-d-learn
On Thursday, 7 March 2024 at 18:14:32 UTC, Gregor Mückl wrote: 1. Missing import libraries for Win32 API functions. Anything starting with `__imp_` is a symbol that should be provided by a DLL import library. MapViewOfFileNuma2 for example is provided by onecore.lib in the Windows SDK,

Re: DMD windows and Clang's llvm-link.exe

2024-03-09 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 10/03/2024 11:02 AM, Carl Sturtivant wrote: I'd like to see if I can get dmd to work correctly with Clang rather than MS tools. Can anyone share any experience they've had with this or any understanding of the situation? lld is used and distributed with dmd and ldc. That is known to work.

DMD windows and Clang's llvm-link.exe

2024-03-09 Thread Carl Sturtivant via Digitalmars-d-learn
I'd like to see if I can get dmd to work correctly with Clang rather than MS tools. Can anyone share any experience they've had with this or any understanding of the situation?

Re: Can a D library have some types determined by the client program?

2024-03-09 Thread Liam McGillivray via Digitalmars-d-learn
Update on two things: One is that I now better understand what it means that D objects are "reference by default". This means that references *can* be null if they are declared with a class. In my commits last night, I have changed many pointers into references. I think my time will be

How to terminate thread under module destructor?

2024-03-09 Thread An Pham via Digitalmars-d-learn
import core.thread.osthread : Thread; import std.stdio : writeln; __gshared static Thread th; __gshared static size_t tht; void run() { writeln("run"); while (tht == 0) {} } shared static this() { writeln("this"); th = new Thread().start();

Re: DMD windows and Clang's llvm-link.exe

2024-03-09 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 10/03/2024 4:46 PM, Carl Sturtivant wrote: suggesting that there's a reason version 9 instead of 17 of lld is being used in the latest DMD installation, that may be relevant what I'd like to try. Any idea what that might be? Yes, nobody has updated it.

Re: Can a D library have some types determined by the client program?

2024-03-09 Thread Liam McGillivray via Digitalmars-d-learn
I have made a new branch of my project called "templates-interfaces" which reworks some things, and turns the Map class into an interface and template. It is now functioning like the master branch, but I think the code should now be (arguably) easier to follow. At least that's true for the

Re: DMD windows and Clang's llvm-link.exe

2024-03-09 Thread Carl Sturtivant via Digitalmars-d-learn
On Sunday, 10 March 2024 at 04:22:20 UTC, Richard (Rikki) Andrew Cattermole wrote: On 10/03/2024 4:46 PM, Carl Sturtivant wrote: suggesting that there's a reason version 9 instead of 17 of lld is being used in the latest DMD installation, that may be relevant what I'd like to try. Any idea

Re: DMD windows and Clang's llvm-link.exe

2024-03-09 Thread Carl Sturtivant via Digitalmars-d-learn
On Saturday, 9 March 2024 at 22:07:05 UTC, Richard (Rikki) Andrew Cattermole wrote: lld is used and distributed with dmd and ldc. That is known to work. If you have MSVC, it'll prefer that however. Interesting, perhaps I should have known that, though I have not used DMD on Windows for many

Re: Why am I getting segfaults when doing `foreach` with arrays of references?

2024-03-09 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 09/03/2024 8:49 PM, Liam McGillivray wrote: But that begs the question; why? Don't dynamic arrays always start with a length of 0? If the array was only extended when valid objects were appended using the append operator |~=|, and none of those objects were deleted (as I the destructor was

Re: Why am I getting segfaults when doing `foreach` with arrays of references?

2024-03-09 Thread Liam McGillivray via Digitalmars-d-learn
On Saturday, 9 March 2024 at 07:49:52 UTC, Liam McGillivray wrote: But that begs the question; why? Don't dynamic arrays always start with a length of 0? If the array was only extended when valid objects were appended using the append operator `~=`, and none of those objects were deleted (as I