Need help with Windows linkage ( DMD using ImportC)
Carl Sturtivant
sturtivant at gmail.com
Sat Mar 9 21:58:34 UTC 2024
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, according to Microsoft
> documentation.
Onecore: not sure what I did to add that dependency. Two symbols
there. Thanks for the __imp_ clue.
> 2. C code referring to MSVC-specific compiler intrinsics. At
> least InterlockedExchangeAdd, InterlockedExchangeAdd64 and
> _stosb are such intrinsics. This is harder to resolve. There
> are two ways forward here: either implement a shim function
> that replicates the intrinsic's functionality if possible or
> add support for these intrinsics to DMD.
Yes, not sure what the potential consequences are for my dirty
replacement. Presumably DMD itself won't generate code using
these, but ...
More information about the Digitalmars-d-learn
mailing list