JuliaInterop / Cxx.jl

The Julia C++ Interface
Other
755 stars 107 forks source link

New clang instance #460

Open TrebstRegistrator opened 4 years ago

TrebstRegistrator commented 4 years ago

I try to do what is suggested in the documentation, i.e. __current_compiler__ = Cxx.new_clang_instance(), but I get

cannot assign a value to variable CxxCore.__current_compiler__ from module Main

How can I reset the current cxx session/get a new clang instance?

Gnimuc commented 4 years ago

I cannot reproduce on macOS:

julia> using Cxx
[ Info: Precompiling Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2]

julia> __current_compiler__ = Cxx.new_clang_instance()
Cxx.CxxCore.CxxInstance{2}()
carstenbauer commented 4 years ago

It seems to be a Cxx + IJulia issue. It runs fine in the REPL but not in a Jupyter notebook (on Windows10).