digitalmars.D.learn - Unresolved external symbol InterlockedIncrement
I am building a 64 bit windows app with latest DMD and I keep getting this linker error: error LNK2019: unresolved external symbol InterlockedIncrement referenced in function ThreadProc This function should be a part of kernel32.lib which I verified is found by using /VERBOSE:LIB linker arg. The only other clue I have is a bigger comment block above the InterlockedIncrement declaration in winbase.d which starts with: // These functions are problematic Does anyone know what is the problem here?
Aug 13 2017
On Sunday, 13 August 2017 at 16:29:14 UTC, Igor wrote:I am building a 64 bit windows app with latest DMD and I keep getting this linker error: error LNK2019: unresolved external symbol InterlockedIncrement referenced in function ThreadProc This function should be a part of kernel32.lib which I verified is found by using /VERBOSE:LIB linker arg. The only other clue I have is a bigger comment block above the InterlockedIncrement declaration in winbase.d which starts with: // These functions are problematic Does anyone know what is the problem here?As far as I managed to find this is actually a compiler intrinsic for C so it probably shouldn't have been defined in winbase.d at all... I switched to using core.atomic.atomicOp which should be the same thing. Actually atomicFetchAdd would be the same thing but for some reason it is defined as private...
Aug 13 2017