"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!
ImportC doesn't support gcc's inline assembler, either. Is the use of these intrinsics blockable with some macro?
(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).
Could you please post the section of code in the windows.h you have?
Created attachment 1878 [details] VC intrinsics referenced by windows.h
(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.
Another problem is #define GENERIC_READ (0x80000000L) these are interpreted as helper macros due to parentheses and skipped.
(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
Here's a workaround. https://forum.dlang.org/post/lbvjpwqgcgducgoxwsxe@forum.dlang.org There's a list of all x64 MSVC intrinsics at the included link with prototypes with named parameters.