-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difficulty using Cxx inside a module #424
Comments
Actually, I'm not sure exactly what's happening. In the simple MWE below, I see MWE at https://github.com/goretkin/CxxInitMWE (archive attached for posterity) |
My difficulties seem to have been related to precompilation and initialization. Adding |
Related to #343 |
I had done
import Cxx
twice in a project, and due to the lineCxx.jl/src/Cxx.jl
Line 178 in 93359f1
this resets the active instances. I personally found this behavior surprising, since all the translation units I had previously loaded were loaded into a different instance.
I thought I could keep a handle to the
Cxx.CxxCore.ClangCompiler
instance, so I could use it later. It seems that this definitionCxx.jl/src/clanginstances.jl
Line 40 in 93359f1
exists for that use.
So I tried
my_cxx_compiler_instance = Cxx.instance(Cxx.__current_compiler__)
right after all of myaddHeaderDir
andcxxinclude
calls. And then later__current_compiler__ = my_cxx_compiler_instance
However the definitions at
Cxx.jl/src/codegen.jl
Lines 840 to 853 in 93359f1
CxxInstance
unnecessarily.The text was updated successfully, but these errors were encountered: