You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried several times, from scratch, but it still seems to fail.
I'm trying to generate the FFI library for libinsane. The result builds, but the tests pretty much all fail. A few examples from the error logs:
tests/layout.c:11:51: error: ‘LibinsaneApi’ undeclared (first use in this function)
11 | printf("%s;%zu;%zu\n", "LibinsaneApi", sizeof(LibinsaneApi), alignof(LibinsaneApi));
| ^~~~~~~~~~~~
tests/constant.c: In function ‘main’:
tests/layout.c:19:57: error: ‘LibinsaneImgFormat’ undeclared (first use in this function)
19 | printf("%s;%zu;%zu\n", "LibinsaneImgFormat", sizeof(LibinsaneImgFormat), alignof(LibinsaneImgFormat));
| ^~~~~~~~~~~~~~~~~~
tests/constant.c:32:21: error: ‘guint’ undeclared (first use in this function); did you mean ‘int’?
32 | PRINT_CONSTANT((guint) LIBINSANE_CAPABILITY_AUTOMATIC);
| ^~~~~
tests/constant.c:11:22: note: in definition of macro ‘PRINT_CONSTANT’
11 | printf(_Generic((CONSTANT_NAME), \
| ^~~~~~~~~~~~~
tests/constant.c:32:21: note: each undeclared identifier is reported only once for each function it appears in
32 | PRINT_CONSTANT((guint) LIBINSANE_CAPABILITY_AUTOMATIC);
| ^~~~~
tests/constant.c:11:22: note: in definition of macro ‘PRINT_CONSTANT’
11 | printf(_Generic((CONSTANT_NAME), \
| ^~~~~~~~~~~~~
tests/constant.c:32:28: error: expected ‘)’ before ‘LIBINSANE_CAPABILITY_AUTOMATIC’
32 | PRINT_CONSTANT((guint) LIBINSANE_CAPABILITY_AUTOMATIC);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have built and installed the library succesfully (if ld can find it, why shouldn't gir?). I've had to edit the gir file to fix a couple minor issues, but nothing that should cause this sort of disruption.
Any idea on what could be causing this, or at least on where I could begin looking?
If it helps, I'm attaching my edited gir file. Everything else is pretty much a 1:1 of what the book does.
The text was updated successfully, but these errors were encountered:
Hi, I had similar output and basically what helps is to add include of project header files to manual.h. Of course then I found that some types is in gir and not in header files, so it needs to be fixed upstream.
I've tried several times, from scratch, but it still seems to fail.
I'm trying to generate the FFI library for libinsane. The result builds, but the tests pretty much all fail. A few examples from the error logs:
I have built and installed the library succesfully (if
ld
can find it, why shouldn'tgir
?). I've had to edit the gir file to fix a couple minor issues, but nothing that should cause this sort of disruption.Any idea on what could be causing this, or at least on where I could begin looking?
If it helps, I'm attaching my edited gir file. Everything else is pretty much a 1:1 of what the book does.
The text was updated successfully, but these errors were encountered: