Open noregretti opened 3 years ago
Hi @noregretti Thanks for the updates. I'm trying to get an automated build pipeline going, but keep hitting into
C:\projects\libnfc\libnfc\drivers\acr122_usb.c:586:3: error: unknown type name 'off_t'
586 | off_t offset = 0;
| ^~~~~
libnfc\CMakeFiles\nfc.dir\build.make:195: recipe for target 'libnfc/CMakeFiles/nfc.dir/drivers/acr122_usb.c.obj' failed
mingw32-make[2]: *** [libnfc/CMakeFiles/nfc.dir/drivers/acr122_usb.c.obj] Error 1
CMakeFiles\Makefile
Did you encounter this problem ?
Hi @noregretti Thanks for the updates. I'm trying to get an automated build pipeline going, but keep hitting into
C:\projects\libnfc\libnfc\drivers\acr122_usb.c:586:3: error: unknown type name 'off_t' 586 | off_t offset = 0; | ^~~~~ libnfc\CMakeFiles\nfc.dir\build.make:195: recipe for target 'libnfc/CMakeFiles/nfc.dir/drivers/acr122_usb.c.obj' failed mingw32-make[2]: *** [libnfc/CMakeFiles/nfc.dir/drivers/acr122_usb.c.obj] Error 1 CMakeFiles\Makefile
Did you encounter this problem ?
(Un)fortunately I did not encounter such problem, sorry.
First of all, nice work. I encountered some issues though (on Windows 10 pro 64 bit, version 10.0.19402), which I finally solved. I am sharing my insights. Maybe someone has been struggling with similar problems, or maybe @peacepenguin wants to make an update.
CMake Error at cmake/modules/FindLIBUSB.cmake:55 (MESSAGE): Could not find LIBUSB ( probably also the problem of #2) Looking into the code of ..\libnfc\cmake\modules\FindLIBUSB.cmake I see that
FIND_LIBRARY(LIBUSB_LIBRARIES NAMES libusb0 PATHS "$ENV{ProgramFiles}/LibUSB-Win32/bin/amd64")
fails to find anything although the library is at exactly said directory. Somehow this is related to which file ending is expected. On windows machines, just addSET(CMAKE_FIND_LIBRARY_PREFIXES "")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
before.errors at mingw32-make
... (and a few similar warnings, followed by a few similar errors, eg. :
here, simply commenting out the respective redefinition lines in ..\libnfc\contrib\windows.h helped - judging from the comments in the code, these were a few hacks which were formerly required (maybe with another version of some software or OS?)
trouble finding the device Putting the config file into the folder as described worked for me, but the question arises regarding the content: A search quick search on the internet didn't reveal immediately, how the correct device.connstring should look like for the particular device on a Windows machine. Therefore just put the following in the config for now (you can go back later to disable the intrusive scan and add the correct device.connstring once the device has been found once):
Finally in windows device manager, the device should not show up as driverless. In my case, I had to use zadig to assign the libusb-win32 (v1.2.6.0) driver (thanks for the hint in the answers to #1 )