Closed aabdullah-bos closed 11 years ago
In the function Refernce_compare_and_set you call:
InterlockedCompareExchange
however, this funciton is implemented as the compiler intrinsic:
_InterlockedCompareExchange ... see link below
_InterlockedCompareExchange
http://msdn.microsoft.com/en-us/library/windows/desktop/ms683560(v=vs.85).aspx
Without this you get the link error:
c:\Users\whodoo\devel\tools>easy_install atomic Processing atomic Running setup.py -q bdist_egg --dist-dir c:\Users\whodoo\devel\tools\atomic\e gg-dist-tmp-mpgowe _reference.c atomic/_reference.c(95) : warning C4013: **'InterlockedCompareExchange'** undefined; assuming extern returning int atomic/_reference.c(95) : error C2065: 'old_value' : undeclared identifier error: Setup script exited with error: command '"c:\Program Files (x86)\Microsof t Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
I am not sure if you need to include Windows.h, but I also added the following code at the top of _reference.c.
#if defined(_MSC_VER) #include <Windows.h> #
In the function Refernce_compare_and_set you call:
InterlockedCompareExchange
however, this funciton is implemented as the compiler intrinsic:
_InterlockedCompareExchange
... see link belowhttp://msdn.microsoft.com/en-us/library/windows/desktop/ms683560(v=vs.85).aspx
Without this you get the link error:
I am not sure if you need to include Windows.h, but I also added the following code at the top of _reference.c.