-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
importing #define numerical constants to Julia #116
Comments
In general it is not possible without writing a very large amount of code. But some of the more trivial conversions (e.g. numerical constants) are attempted by CBinding. julia> module Macros
using CBinding
c``
c"""
#define NUMBER 1234
"""j
end
Main.Macros
julia> Macros.@NUMBER
1234 |
fantastic. It is working for me. One more thing, if you could have a look at the xxh project (referenced in a previous issue): Naturally, I can create a custom wrapper for the function, but it would be a shame to load the library with Libdl just for this function |
Related: using the Cling is now available as a jll: https://github.com/JuliaBinaryWrappers/Cling_jll.jl |
is it possible to import
#define NAME val
from a C header file to Julia such thatNAME = val
?The text was updated successfully, but these errors were encountered: