Closed kascote closed 2 years ago
hey there. you shouldn't need any of the *.c
files installed; they're just compiled to build the objects. certainly you ought never be linking ffi.c
into your programs. its purpose is to provide other languages with bindings to notcurses's static inline
functions, which don't normally get compiled into the library as symbols.
essentially, these are very basic functions which are included directly in the headers. every one of the functions you see in ffi.c
is (or at least ought be) present in notcurses.h
, where a c program can include them.
so....
notcurses.h
)does that explain things for you? if not, feel free to ask further questions.
yes I understand. My issue is that the binding generator I use do not support inline functions on .h files, because as you mention these do not finish on the symbol table and assume that re unreachable. For that reason I was using ffi.c
to get the definitions and resolving against libffi
ahhh you want to link libnotcurses-ffi.so
. it contains the generated functions.
you'll need to supply -DBUILD_FFI_LIBRARY=on
to cmake
btw
Is possible to include
ffi.c
on the library distribution? I'm using OSX and the brew version do not include it, but includeslibnotcurses-ffi.*
ffi.c
is handy to autogenerate the bindings. not sure why it not isffi.h
(c is not may main language) or must I ask to the person that bundle notcurses on brew ?