steinbergmedia / vst3_pluginterfaces

VST 3 API
Other
24 stars 18 forks source link

Fix atomicAdd on minGW compiler #5

Closed jpcima closed 3 years ago

jpcima commented 4 years ago

It would not build on MinGW-w64 GCC 9.2.1.

The error was:

/home/jpc/documents/projects/sfizz/vst/external/VST_SDK/VST3_SDK/pluginterfaces/base/funknown.cpp: In function 'Steinberg::int32 Steinberg::FUnknownPrivate::atomicAdd(Steinberg::int32&, Steinberg::int32)':
/home/jpc/documents/projects/sfizz/vst/external/VST_SDK/VST3_SDK/pluginterfaces/base/funknown.cpp:87:40: error: no matching function for call to '_InterlockedExchangeAdd(Steinberg::int32*, Steinberg::int32&)'
   87 |  return InterlockedExchangeAdd (&var, d) + d;