Is there a way to Deferred binding symbol from dynamic library?

2024-11-21 Thread Dakota via Digitalmars-d-learn
Try build a dynamic library, a lot function symbol and global symbol need to be deferred binding from runtime app. It can be done by pass `-Wl,-undefined,dynamic_lookup` or `--unresolved-symbols=dynamic_lookup` to linker. I am look a way to do it from d code, like `pragma(linkerDirective,

Re: std.mmfile + std.bitmanip.peek, void[] is not a forward range?

2024-11-21 Thread Ben Jones via Digitalmars-d-learn
On Thursday, 21 November 2024 at 22:09:45 UTC, Jonathan M Davis wrote: void[] can refer to an array of anything, and it's not at all type-safe or memory-safe to access its elements. It would be like implicitly treating a void* like a pointer to any specific type. If you want to access anyth

std.mmfile + std.bitmanip.peek, void[] is not a forward range?

2024-11-21 Thread Ben Jones via Digitalmars-d-learn
I'm trying to read integers out of a mmap'd file using std.bitmanip.peek and it's failing because `isForwardRange!(void[])` is false That seems unexpected, am I missing something or is that a bug? Am I doing something wrong here? ``` scope mmFile = new MmFile(filename, MmFile.Mode.read, 0, n

Re: std.mmfile + std.bitmanip.peek, void[] is not a forward range?

2024-11-21 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 21, 2024 2:51:33 PM MST Ben Jones via Digitalmars-d- learn wrote: > I'm trying to read integers out of a mmap'd file using > std.bitmanip.peek and it's failing because > > `isForwardRange!(void[])` is false > > That seems unexpected, am I missing something or is that a bug? >