Hi
I just tried to make bindings for libgpiod and thought I’d try the crystal_lib binding generator, but I can’t get it to work.
So, I tried some of the examples, and all of them look like this:
crystal src/main.cr -- examples/lib_ssl.cr
Unhandled exception: can't find function SSL_load_error_strings (Exception)
from src/crystal_lib/lib_body_transformer.cr:17:5 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:23:9 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from src/crystal_lib/lib_transformer.cr:21:19 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:23:9 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from src/main.cr:5:1 in '__crystal_main'
from /usr/share/crystal/src/crystal/main.cr:106:5 in 'main_user_code'
from /usr/share/crystal/src/crystal/main.cr:92:7 in 'main'
from /usr/share/crystal/src/crystal/main.cr:115:3 in 'main'
from __libc_start_main
from _start
from ???
crystal src/main.cr -- examples/libc.cr
Unhandled exception: can't find constant TCP_KEEPALIVE (Exception)
from src/crystal_lib/lib_body_transformer.cr:38:5 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:23:9 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from src/crystal_lib/lib_transformer.cr:21:19 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:23:9 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from src/main.cr:5:1 in '__crystal_main'
from /usr/share/crystal/src/crystal/main.cr:106:5 in 'main_user_code'
from /usr/share/crystal/src/crystal/main.cr:92:7 in 'main'
from /usr/share/crystal/src/crystal/main.cr:115:3 in 'main'
from __libc_start_main
from _start
from ???
crystal src/main.cr -- examples/lib_curses.cr
Unhandled exception: can't find function refresh (Exception)
from src/crystal_lib/lib_body_transformer.cr:17:5 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:23:9 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from src/crystal_lib/lib_transformer.cr:21:19 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:23:9 in 'transform'
from /usr/share/crystal/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
from src/main.cr:5:1 in '__crystal_main'
from /usr/share/crystal/src/crystal/main.cr:106:5 in 'main_user_code'
from /usr/share/crystal/src/crystal/main.cr:92:7 in 'main'
from /usr/share/crystal/src/crystal/main.cr:115:3 in 'main'
from __libc_start_main
from _start
from ???
I assume that I’m doing something wrong, but this is supposed to work like that? Right?