I'm using Windows 10 on x86-64, with Visual Studio Community 2019 version 16.11.15, targeting 64-bit builds.
I had trouble building FOX on Windows:
fox-1.7.80\lib\FXAtomic.cpp(268,10): error C3861: '_InterlockedAdd64': identifier not found
The fix was to replace these calls with calls to '_InlineInterlockedAdd64', following Microsoft documentation.
('InterlockedAdd64' also seemed to work, but unlike 'InlineInterlockedAdd64' it doesn't appear to be documented. Curiously I wasn't able to get 'InterlockedAdd' to resolve even if I #include <intrin.h>
, per further Microsoft documentation.)
I've not tested the atomics functionality after my change, I can only confirm that the build succeeds.
Also, I've not tested on any other Windows development environments, e.g. different version of Visual Studio.
I've also not tested 32-bit, I've not been able to get it to build (seemingly many different problems at play).
Inapplicable as of FOX 1.7.81 which includes a similar change, but uses '_InterlockedExchangeAdd64' rather than '_InlineInterlockedAdd64'. [0] [1]
[0] https://learn.microsoft.com/en-us/cpp/intrinsics/interlockedexchangeadd-intrinsic-functions
[1] https://learn.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-interlockedexchangeadd64