BetterC Name Mangling Linker Errors

2022-07-27 Thread MyNameHere via Digitalmars-d-learn
I have included the source to a simple 64-bit Windows program. It compiles and runs fine with ```dmd -m64 -L="/Subsystem:Windows" -L="/Entry:Main" Main.d```. But compiling with ```-betterC``` using the following throws up a linker error, ```dmd -m64 -betterC -L="/Subsystem:Windows" -L="/Entry:M

Re: BetterC Name Mangling Linker Errors

2022-07-27 Thread MyNameHere via Digitalmars-d-learn
Thank you, that seems to have been the source of the error.

"Error: no property `offsetof` for type `char*`"

2022-08-19 Thread MyNameHere via Digitalmars-d-learn
I am receiving this error: ``` Error: no property `offsetof` for type `char*` ``` from this snippet: ```d import core.sys.windows.setupapi; void main() { SP_DEVICE_INTERFACE_DETAIL_DATA_A DeviceInterfaceDetail; uint Offset = DeviceInterfaceDetail.DevicePath.offsetof; } ``` You may try

Re: "Error: no property `offsetof` for type `char*`"

2022-08-19 Thread MyNameHere via Digitalmars-d-learn
Thank you, that seems to have resolved the issue, though I wish these sorts of problems would stop cropping up, they are souring the experience with the language.

Re: "Error: no property `offsetof` for type `char*`"

2022-08-19 Thread MyNameHere via Digitalmars-d-learn
On Friday, 19 August 2022 at 14:30:50 UTC, kinke wrote: Oh and `DevicePath()` is a convenience member returning a pointer to the 'dynamic array' (as the array decays to a pointer in C too), so no need to fiddle with `.offsetof` and computing the pointer manually. I am using ```-BetterC```, so