-
Notifications
You must be signed in to change notification settings - Fork 68
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
trouble wraping glib #206
Comments
forgot to mention that the offending line is number 44 of
i infer this for if i change line 630 of Clang/src/wrap_c.jl to be:
and then run the reproduction example above again, i get:
searching the header files yields only one line with those special characters:
|
that's because try
target = Meta.parse(exprn)
e = Expr(:const, Expr(:(=), use_sym, target))
catch err
e = :(const $use_sym = $(exprn[2:end-1]))
end |
thanks for the quick reply! Clang gets much further with a slight modification to your code snippet. i had to alter it because
now it's getting stuck with the following trace. same trace is emitted when i use
|
that looks like an orthogonal error, did you find which line in the header file that triggered this error? |
I just found this issue is actually a dup of #196 (comment). It looks like you were wrapping using Clang
context = wrap_c.init(
clang_includes=[
"/Users/arthurb/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/pango/1.42.4/include/pango-1.0",
"/Users/arthurb/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/glib/2.58.0_1/include/glib-2.0",
"/Users/arthurb/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/glib/2.58.0_1/lib/glib-2.0/include",
"/Users/arthurb/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/cairo/1.14.12/include/cairo"],
headers=[
"/Users/arthurb/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar/pango/1.42.4/include/pango-1.0/pango/pangocairo.h"],
common_file="pangocairo-constants.jl",
header_library = x->"_jl_libpangocairo",
header_wrapped = (top_header, cursor_header) -> top_header == cursor_header)
)
run(context) |
thanks! making progress. now the problem is that Clang is outputing |
those compiler definitions are skipped: Currently, Clang.jl is mainly for trivial jobs, it's common to manually tweak the output code. |
hi @bjarthur, Clang.jl master now ships a ctypes.jl file which includes |
the master branch (fa22244) of clang is choking on a
#define
with special characters in it:the error is:
to reproduce, first install Cairo.jl, which is how i got the glib header files, and how i'm hoping to wrap all of libpangocairo, and then:
it's worth nothing that simply
using Clang
results in the following warning:any ideas? i'd be happy with a work around. thanks.
The text was updated successfully, but these errors were encountered: