steinbergmedia / vst3sdk

VST 3 Plug-In SDK
Other
1.65k stars 162 forks source link

Error E0020 identifier "atomic_fetch_add" and "atomic_int_least32_t" is undefined (Win10) #90

Closed lexlab245 closed 2 years ago

lexlab245 commented 2 years ago

I get an error when trying to compile the examples. As I understand it, this error occurs at the compilation stage of the library "pluginterfaces" and i have no idea how to fix it. This is code that don't work (vst3sdk\pluginterfaces\base\funknown.cpp): image This is the only error that occurs during compilation (except for errors that occur due to missing library that fails to compile due to those errors)

LeStahL commented 2 years ago

Set the C++ standard to 23 using

set(CMAKE_CXX_STANDARD 23)

Fixed it for me

RinoReyns commented 2 years ago

another option that I found somewhere in internet is following: if (MSVC) set(SMTG_USE_STDATOMIC_H OFF CACHE BOOL "" FORCE) endif()

It should be set in main Cmake file. Works for me. I use cxx_std_17.

lexlab245 commented 2 years ago

The solution helped me: cmake -DSMTG_USE_STDATOMIC_H=OFF .

seanbo commented 2 years ago

Set the C++ standard to 23 using

set(CMAKE_CXX_STANDARD 23)

Fixed it for me

This worked for me as well. Thank you!!