Skip to content

Julia 1.7.0beta4 atomics.h errors embedding Julia in C++ Windows 10 MSVC 2019 v142 #42098

Closed
@solaris783

Description

@solaris783

I get a host of compile errors (about 30) by trying to compile the simple "Embedding Julia in C++" https://docs.julialang.org/en/v1/manual/embedding/.

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

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions