"Windows.h" intrinsics:
main.obj : error LNK2019: unresolved external symbol _InterlockedExchangeAdd referenced in function _InlineInterlockedAdd
main.obj : error LNK2019: unresolved external symbol _InterlockedExchangeAdd64 referenced in function _InlineInterlockedAdd64
main.obj : error LNK2019: unresolved external symbol _mul128 referenced in function MultiplyExtract128
main.obj : error LNK2019: unresolved external symbol __shiftright128 referenced in function MultiplyExtract128
main.obj : error LNK2019: unresolved external symbol _umul128 referenced in function UnsignedMultiplyExtract128
main.obj : error LNK2019: unresolved external symbol _ReadWriteBarrier referenced in function BarrierAfterRead
main.obj : error LNK2019: unresolved external symbol __stosb referenced in function RtlSecureZeroMemory
main.obj : error LNK2019: unresolved external symbol __readgsqword referenced in function NtCurrentTeb
Fun!
Comment #1 by bugzilla — 2023-05-11T06:01:59Z
ImportC doesn't support gcc's inline assembler, either. Is the use of these intrinsics blockable with some macro?
Comment #2 by maxsamukha — 2023-05-11T17:12:13Z
(In reply to Walter Bright from comment #1)
> Is the use of these intrinsics blockable with some macro?
I don't think so. They are not conditioned on a macro that could be simply (un)defined (if that's what you meant).
Comment #3 by bugzilla — 2023-05-29T07:10:30Z
Could you please post the section of code in the windows.h you have?
Comment #4 by maxsamukha — 2023-06-03T06:53:11Z
Created attachment 1878
VC intrinsics referenced by windows.h
Comment #5 by maxsamukha — 2023-06-03T06:53:58Z
(In reply to Walter Bright from comment #3)
> Could you please post the section of code in the windows.h you have?
Please see an isolated test case in the attachment.
Comment #6 by dfj1esp02 — 2023-12-01T10:26:40Z
Another problem is
#define GENERIC_READ (0x80000000L)
these are interpreted as helper macros due to parentheses and skipped.
Comment #7 by bugzilla — 2023-12-02T02:27:35Z
(In reply to anonymous4 from comment #6)
> Another problem is
>
> #define GENERIC_READ (0x80000000L)
>
> these are interpreted as helper macros due to parentheses and skipped.
This PR should resolve that problem.
https://github.com/dlang/dmd/pull/15871