November 30th, 2012, 12:59 PM
What's going on with InterlockedAnd ???
When linking the above code I get linker error LNK2019 : unresolved external symbol _InterlockedAnd referenced in function g_atomic_int_and. The same error occurs for InterlockedOr and InterlockedXor. However, all the others are fine.
#include <windows.h> /* #includes winbase.h which defines InterlockedAnd, InterlockedExchangeAdd and several others */
(g_atomic_int_add) (volatile gint *atomic,
return InterlockedExchangeAdd (atomic, val);
(g_atomic_int_and) (volatile guint *atomic,
return InterlockedAnd (atomic, val);
All the others seem to be in kernel32.dll - but InterlockedAnd, InterlockedOr and InterlockedXor are nowhere to be found. It looks like the intention was for them to get inlined but I can't seem to make it work. What am I doing wrong...
"A problem well stated is a problem half solved.” - Charles F. Kettering
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.