__atomic errors when embedding into a C++ project using binaries built from latest (1.7) source or using installer (Windows 10 using Visual Studio 2019)

I get a host of compile errors (about 30). Here are the first 5:

1>C:\Users\VitalRoberto\AppData\Local\Programs\Julia-1.7.0-beta4\include\julia\julia_threads.h(321,5): error C2065: ‘__ATOMIC_SEQ_CST’: undeclared identifier
1>C:\Users\VitalRoberto\AppData\Local\Programs\Julia-1.7.0-beta4\include\julia\julia_threads.h(321,5): error C3861: ‘__atomic_signal_fence’: identifier not found
1>C:\Users\VitalRoberto\AppData\Local\Programs\Julia-1.7.0-beta4\include\julia\julia_threads.h(321,5): error C2065: ‘__ATOMIC_RELEASE’: undeclared identifier
1>C:\Users\VitalRoberto\AppData\Local\Programs\Julia-1.7.0-beta4\include\julia\julia_threads.h(321,5): error C3861: ‘__atomic_store_n’: identifier not found
1>C:\Users\VitalRoberto\AppData\Local\Programs\Julia-1.7.0-beta4\include\julia\julia_threads.h(325,9): error C2065: ‘__ATOMIC_SEQ_CST’: undeclared identifier

My test code is the very basic embed example from the docs.

in 1.7, atomics.h doesn’t have good definitions for MSVC. I copied atomics.h from 1.6.5 into 1.7.0 and got it to work (also had to define jl_atomic_cmpswap). Seems like someone overlooked this platform.

My startup.jl is empty. I’m running on a decent laptop i7-8750H with 32GB. Using Visual Studio 2019 v142.

Probably best to open an issue for this, as the beta has not been released yet and it’s likely this is due to the changes to atomics in 1.7 (at least that’s what the missing identifiers are suggesting).

I opened an issue