Skip to content

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

@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.

Activity

self-assigned this
on Sep 7, 2021
added a commit that references this issue on Sep 7, 2021
1d58bd0
added 6 commits that reference this issue on Sep 8, 2021
591dccf
19dcf5e
9587946
3e7f980
cbeb67f
233cc24
added a commit that references this issue on Sep 15, 2021
947ee44
added a commit that references this issue on Sep 28, 2021
a6105cb
added a commit that references this issue on Feb 22, 2022
8ba30f2
added a commit that references this issue on Mar 8, 2022
841bb99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @vtjnash@solaris783

    Issue actions

      Julia 1.7.0beta4 atomics.h errors embedding Julia in C++ Windows 10 MSVC 2019 v142 · Issue #42098 · JuliaLang/julia