Topic: LibNfc on windows for newbie

Hello everyone. I am a newbie of this API.
I am trying to understand How to use this API on windows, with many problems.
I downloaded:

- libnfc-1.7.0-rc7.tar.gz

-cmake- [MinGw-W64]
- tdm-gcc-4.7.1-2
- libusb-win32-bin-
- pcre-7.0
- doxygen [Cmake told me it was missing]

and using the GUI of CMAKE I selected:

- USB Lib Include: libusb-win32-bin-
- USB Lib library: libusb-win32-bin-
- PCRE Include:C:/Program Files (x86)/GnuWin32/include
- PCRE Lib:C:/Program Files (x86)/GnuWin32/lib/pcre.lib

In the GUI I wrote location of the source code: C:/libnfc-1.7.0-rc7/libnfc-1.7.0-rc7
And where to build the file: C:\BuildNFC

And I receive this output:

Found PCRE: C:/Program Files (x86)/GnuWin32/lib/pcre.lib C:/Program Files (x86)/GnuWin32/include
Found LIBUSB: C:/Users/Dany/Documents/NFC-attacks/libusb-win32-bin- C:/Users/Dany/Documents/NFC-attacks/libusb-win32-bin-
Year for copyright is 2013
Configuring done
Generating done

After this I looked inside of the folder BuildNFC and I found many files but nothing like nfc.dll or ".h" files or ".c" files.

What should I do in order to use this library?

Thank you very much. Sorry for this dummies question but I am working on this problem without find the solution.

Re: LibNfc on windows for newbie

Hello, I understood what I missed. After a couple of time that I was able to generate correctly the library following the instructions I receive this error:

Scanning dependencies of target nfc
[  1%] Building C object libnfc/CMakeFiles/nfc.dir/nfc.c.obj
[  3%] Building C object libnfc/CMakeFiles/nfc.dir/nfc-device.c.obj
[  5%] Building C object libnfc/CMakeFiles/nfc.dir/nfc-emulation.c.obj
[  7%] Building C object libnfc/CMakeFiles/nfc.dir/nfc-internal.c.obj
[  8%] Building C object libnfc/CMakeFiles/nfc.dir/conf.c.obj
[ 10%] Building C object libnfc/CMakeFiles/nfc.dir/iso14443-subr.c.obj
[ 12%] Building C object libnfc/CMakeFiles/nfc.dir/mirror-subr.c.obj
[ 14%] Building C object libnfc/CMakeFiles/nfc.dir/target-subr.c.obj
[ 15%] Building C object libnfc/CMakeFiles/nfc.dir/drivers/acr122_usb.c.obj
C:\libnfc-1.7.0-rc7\libnfc\drivers\acr122_usb.c: In function 'acr122_usb_receive
C:\libnfc-1.7.0-rc7\libnfc\drivers\acr122_usb.c:587:3: error: 'off_t' undeclared
 (first use in this function)
C:\libnfc-1.7.0-rc7\libnfc\drivers\acr122_usb.c:587:3: note: each undeclared ide
ntifier is reported only once for each function it appears in
C:\libnfc-1.7.0-rc7\libnfc\drivers\acr122_usb.c:587:9: error: expected ';' befor
e 'offset'
C:\libnfc-1.7.0-rc7\libnfc\drivers\acr122_usb.c:630:20: error: 'offset' undeclar
ed (first use in this function)
mingw32-make[2]: *** [libnfc/CMakeFiles/nfc.dir/drivers/acr122_usb.c.obj] Error
mingw32-make[1]: *** [libnfc/CMakeFiles/nfc.dir/all] Error 2
mingw32-make: *** [all] Error 2

I tried to repeat the process several time with the same result. What am I doing wrong? because I am using the same process that worked before

Re: LibNfc on windows for newbie

Solved: I have MinGW64 and MinGW [requested for an other program]
and Cmake used the MinGW instead the other one.  After I uninstall MinGW it worked fine.

Re: LibNfc on windows for newbie



Re: LibNfc on windows for newbie

RTFM... or at least README files smile

Romuald Conty