Topic: libnfc for Beginners

Hi

I am new to NFC readers and need some help using libnfc. I have downloaded the libnfc1.1.0 and I work on the Windows platform. I want to write a simple application to autolaunch a web browser for touch a tag. So that, this will be a standalone application, and I dont have to register with touchatag website. Where should I start?

Thank You

Re: libnfc for Beginners

Hi sheetalv021,

sheetalv021 wrote:

Hi
I want to write a simple application to autolaunch a web browser for touch a tag. So that, this will be a standalone application, and I dont have to register with touchatag website. Where should I start?

At first, you can start with the "list" example : you will be able to detect a card and extract some information like uid.
You also must know that you are using MIFARE ultralight tags if you use touchatag's tags : read some documentation about this tag type.

Romuald Conty

Re: libnfc for Beginners

Hi rconty

Thank You for the reply.

I started with the list example for the ACR 122 Reader, and was able to extract information. I also went through the code and am becoming familiar with the implementation of the libnfc api.

Re: libnfc for Beginners

Hello,
I am trying to read tags in cycle. As a base I used nfc-anticool example. The problem si, that first cycle is OK, it read Tag for example 0484b5d9a12580. After that I Drop the field for a while and make whole cycle again, but I got different (wrong) tag UID (44005180). What should I do to get the correct tags UID again (without exit the program and run it again)?

Is there any program to handle event when there is a new TAG on reader? (this is may final goal, but I can't solve such a simple task as read tags more time in one program without exit it).

Thanks

Re: libnfc for Beginners

I want to do something very similar, only i am hoping to make the program launch from a mifare classic 4k.  I know there is room on the card, but i don't know if i can make it self launch without having a host program running on the PC, other than of course the card reader and whatnot.  I am super new to this. I haven't even as of yet successfully launched libnfc. I downloaded everything last night at 3 am. it is such an exciting possibilty, and so overwhelming. i don't know where to start.

I am running windows 7 and have an Omnikey 5321 reader installed and running

Re: libnfc for Beginners

Hi!
I am a new developper on libnfc. I'm trying to install the libnfc on windows vista. I have readed the README-Windows.txt file. I've followed all the steps and I got this error :
c:\dev\libnfc-build>mingw32-make
Scanning dependencies of target nfc
[  5%] Building C object libnfc/CMakeFiles/nfc.dir/drivers/acr122.c.obj
C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\drivers\acr122.c: In function 'acr122_tr
ansceive':
C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\drivers\acr122.c:291:9: warning: implici
t declaration of function 'SCARD_CTL_CODE'
Linking C shared library libnfc.dll
Creating library file: libnfc.dll.a
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x89): undefined refe
rence to `SCardListReaders'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x20c): undefined ref
erence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x232): undefined ref
erence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x284): undefined ref
erence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x2bd): undefined ref
erence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x360): undefined ref
erence to `SCardListReaders'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x4e9): undefined ref
erence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x50f): undefined ref
erence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x547): undefined ref
erence to `SCardDisconnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x57d): undefined ref
erence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x644): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x6ad): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x6e5): undefined ref
erence to `SCardControl'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x747): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x7cd): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x801): undefined ref
erence to `SCardControl'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x877): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x8ca): undefined ref
erence to `SCardConnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x9b8): undefined ref
erence to `SCardConnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x9f0): undefined ref
erence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0xa5e): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0xa7b): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0xaae): undefined ref
erence to `SCardControl'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [libnfc/libnfc.dll] Error 1
mingw32-make[1]: *** [libnfc/CMakeFiles/nfc.dir/all] Error 2
mingw32-make: *** [all] Error 2

I really need your help.

Re: libnfc for Beginners

Hi,

Can you post the complete output when running "mingw32-make VERBOSE=1" please?

Re: libnfc for Beginners

glenn wrote:

Hi,

Can you post the complete output when running "mingw32-make VERBOSE=1" please?



c:\dev\libnfc-build>mingw32-make VERBOSE=1
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:\dev\libnfc-1.4.2\libnfc-1.
4.2 -BC:\dev\libnfc-build --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_start C:\dev\
libnfc-build\CMakeFiles C:\dev\libnfc-build\CMakeFiles\progress.marks
mingw32-make -f CMakeFiles\Makefile2 all
mingw32-make[1]: Entering directory `c:/dev/libnfc-build'
mingw32-make -f libnfc\CMakeFiles\nfc.dir\build.make libnfc/CMakeFiles/nfc.dir/d
epend
mingw32-make[2]: Entering directory `c:/dev/libnfc-build'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_depends "MinGW Makefil
es" C:\dev\libnfc-1.4.2\libnfc-1.4.2 C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc C:\
dev\libnfc-build C:\dev\libnfc-build\libnfc C:\dev\libnfc-build\libnfc\CMakeFile
s\nfc.dir\DependInfo.cmake --color=
mingw32-make[2]: Leaving directory `c:/dev/libnfc-build'
mingw32-make -f libnfc\CMakeFiles\nfc.dir\build.make libnfc/CMakeFiles/nfc.dir/b
uild
mingw32-make[2]: Entering directory `c:/dev/libnfc-build'
Linking C shared library libnfc.dll
cd C:\dev\libnfc-build\libnfc && "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe
" -E cmake_link_script CMakeFiles\nfc.dir\link.txt --verbose=1
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E remove -f CMakeFiles\nfc.dir
/objects.a
C:\MinGW64\bin\ar.exe cr CMakeFiles\nfc.dir/objects.a @CMakeFiles\nfc.dir\object
s1.rsp
C:\MinGW64\bin\gcc.exe   -m32 -shared -o libnfc.dll -Wl,--out-implib,libnfc.dll.
a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archive CMakeF
iles\nfc.dir/objects.a -Wl,--no-whole-archive C:\dev\libusb-win32-bin-1.2.4.0\li
b\gcc\libusb.a C:\dev\pcsc-lite-1.7.2\src\PCSC\pcsclite.h -lkernel32 -luser32 -l
gdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
Creating library file: libnfc.dll.a
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x89): undefined refe
rence to `SCardListReaders'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x20c): undefined ref
erence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x232): undefined ref
erence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x284): undefined ref
erence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x2bd): undefined ref
erence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x360): undefined ref
erence to `SCardListReaders'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x4e9): undefined ref
erence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x50f): undefined ref
erence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x547): undefined ref
erence to `SCardDisconnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x57d): undefined ref
erence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x644): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x6ad): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x6e5): undefined ref
erence to `SCardControl'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x747): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x7cd): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x801): undefined ref
erence to `SCardControl'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x877): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x8ca): undefined ref
erence to `SCardConnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x9b8): undefined ref
erence to `SCardConnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x9f0): undefined ref
erence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0xa5e): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0xa7b): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0xaae): undefined ref
erence to `SCardControl'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [libnfc/libnfc.dll] Error 1
mingw32-make[2]: Leaving directory `c:/dev/libnfc-build'
mingw32-make[1]: *** [libnfc/CMakeFiles/nfc.dir/all] Error 2
mingw32-make[1]: Leaving directory `c:/dev/libnfc-build'
mingw32-make: *** [all] Error 2

thank you

Re: libnfc for Beginners

hi kchempes,

I see that you are including C:\dev\pcsc-lite-1.7.2\src\PCSC\pcsclite.h .
Is there any reason for this? Normally you should be fine with the one included in MinGW64..
Note that the include directory of minGW should be in your path (see README-Windows.txt).

Re: libnfc for Beginners

In fact i don't what are the libraries file. I modified the libraries files and now i get this error :

c:\dev\libnfc-build>mingw32-make VERBOSE=1
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:\dev\libnfc-1.4.2\libnfc-1.
4.2 -BC:\dev\libnfc-build --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_start C:\dev\
libnfc-build\CMakeFiles C:\dev\libnfc-build\CMakeFiles\progress.marks
mingw32-make -f CMakeFiles\Makefile2 all
mingw32-make[1]: Entering directory `c:/dev/libnfc-build'
mingw32-make -f libnfc\CMakeFiles\nfc.dir\build.make libnfc/CMakeFiles/nfc.dir/d
epend
mingw32-make[2]: Entering directory `c:/dev/libnfc-build'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_depends "MinGW Makefil
es" C:\dev\libnfc-1.4.2\libnfc-1.4.2 C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc C:\
dev\libnfc-build C:\dev\libnfc-build\libnfc C:\dev\libnfc-build\libnfc\CMakeFile
s\nfc.dir\DependInfo.cmake --color=
mingw32-make[2]: Leaving directory `c:/dev/libnfc-build'
mingw32-make -f libnfc\CMakeFiles\nfc.dir\build.make libnfc/CMakeFiles/nfc.dir/b
uild
mingw32-make[2]: Entering directory `c:/dev/libnfc-build'
Linking C shared library libnfc.dll
cd C:\dev\libnfc-build\libnfc && "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe
" -E cmake_link_script CMakeFiles\nfc.dir\link.txt --verbose=1
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E remove -f CMakeFiles\nfc.dir
/objects.a
C:\MinGW64\bin\ar.exe cr CMakeFiles\nfc.dir/objects.a @CMakeFiles\nfc.dir\object
s1.rsp
C:\MinGW64\bin\gcc.exe   -m32 -shared -o libnfc.dll -Wl,--out-implib,libnfc.dll.
a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archive CMakeF
iles\nfc.dir/objects.a -Wl,--no-whole-archive C:\MinGW64\lib\libusb.dll.a C:\Min
GW64\lib\libpcsclite.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lol
e32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
Creating library file: libnfc.dll.a
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x5b0): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x7ee): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x8fb): undefined ref
erence to `SCARD_CTL_CODE'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [libnfc/libnfc.dll] Error 1
mingw32-make[2]: Leaving directory `c:/dev/libnfc-build'
mingw32-make[1]: *** [libnfc/CMakeFiles/nfc.dir/all] Error 2
mingw32-make[1]: Leaving directory `c:/dev/libnfc-build'
mingw32-make: *** [all] Error 2

I don't know how to fix it. help!!!

Re: libnfc for Beginners

Hi kchempes,

Please verify that all necessary directories are added to the PATH environment variable, as described in the readme.
Also i suggest to delete your build directory and rerun cmake, to get rid of cached cmake variables.
If it still fails please post the full output which shows the path var, the cmake output, and the mingw32-make output.

thanks,
Glenn

Re: libnfc for Beginners

Hi Glenn

It still fails and i'm starting to think that i can't get it worked on my Windows Vista 64. I think i missed something. So well i send you the outputs:

cmake output
Found LIBUSB: C:/MinGW64/x86_64_w64-mingw32/lib/libusb.a C:/dev/libusb-win32-bin-1.2.4.0/include
Found LIBUSB: C:/MinGW64/x86_64_w64-mingw32/lib/libusb.a C:/dev/libusb-win32-bin-1.2.4.0/include
Configuring done
Generating done

mingw32-make

c:\dev\build>mingw32-make
Scanning dependencies of target nfc
[  4%] Building C object libnfc/CMakeFiles/nfc.dir/nfc.c.obj
[  9%] Building C object libnfc/CMakeFiles/nfc.dir/iso14443-subr.c.obj
[ 14%] Building C object libnfc/CMakeFiles/nfc.dir/mirror-subr.c.obj
[ 19%] Building C object libnfc/CMakeFiles/nfc.dir/drivers/acr122.c.obj
C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\drivers\acr122.c: In function 'acr122_tr
ansceive':
C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\drivers\acr122.c:292:9: warning: implici
t declaration of function 'SCARD_CTL_CODE'
[ 23%] Building C object libnfc/CMakeFiles/nfc.dir/drivers/pn531_usb.c.obj
[ 28%] Building C object libnfc/CMakeFiles/nfc.dir/drivers/pn53x_usb.c.obj
[ 33%] Building C object libnfc/CMakeFiles/nfc.dir/drivers/pn533_usb.c.obj
[ 38%] Building C object libnfc/CMakeFiles/nfc.dir/drivers/arygon.c.obj
[ 42%] Building C object libnfc/CMakeFiles/nfc.dir/buses/uart.c.obj
In file included from C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\buses\uart.c:41:0:

C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\buses\/uart_win32.c: In function 'uart_o
pen':
C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\buses\/uart_win32.c:40:3: warning: impli
cit declaration of function '_strupr'
[ 47%] Building C object libnfc/CMakeFiles/nfc.dir/chips/pn53x.c.obj
C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\chips\pn53x.c: In function 'pn53x_init':

C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\chips\pn53x.c:113:3: warning: implicit d
eclaration of function 'strdup'
C:\dev\libnfc-1.4.2\libnfc-1.4.2\libnfc\chips\pn53x.c:113:10: warning: assignmen
t makes pointer from integer without a cast
Linking C shared library libnfc.dll
Creating library file: libnfc.dll.a
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x5f): undefined refe
rence to `SCardEstablishContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0xac): undefined refe
rence to `SCardReleaseContext'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x1a2): undefined ref
erence to `SCardListReaders'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x366): undefined ref
erence to `SCardConnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x39f): undefined ref
erence to `SCardConnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x4d6): undefined ref
erence to `SCardDisconnect'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x5b0): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x5e9): undefined ref
erence to `SCardControl'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x648): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x700): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x7ee): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x823): undefined ref
erence to `SCardControl'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x866): undefined ref
erence to `SCardTransmit'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x8fb): undefined ref
erence to `SCARD_CTL_CODE'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x92f): undefined ref
erence to `SCardControl'
CMakeFiles\nfc.dir/objects.a(acr122.c.obj):acr122.c:(.text+0x972): undefined ref
erence to `SCardTransmit'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [libnfc/libnfc.dll] Error 1
mingw32-make[1]: *** [libnfc/CMakeFiles/nfc.dir/all] Error 2
mingw32-make: *** [all] Error 2

PATH

c:\dev\build>path
PATH=C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Win
dows;C:\Windows\System32\Wbem;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Co
re-Static;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program
Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Co
mmon Files\DivX Shared\;C:\Program Files (x86)\ImageConverter Plus;C:\Program Fi
les (x86)\ImageConverter Plus\Microsoft.VC80.CRT;C:\Program Files (x86)\ImageCon
verter Plus\Microsoft.VC80.MFC;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Win
dows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Subversion\bin,C:\d
ev\libusb-win32-bin-1.2.4.0\include;C:\MinGW64\bin;C:\MinGW64\bin;C:\dev\doxygen
\doxygen-1.6.1-2\usr\bin; C:\MinGW64\lib;C:\MinGW64\x86_64_w64-mingw32\include;C
:\MinGW64\x86_64_w64-mingw32\lib;C:\MinGW64\x86_64_w64-mingw32\lib32\;C:\dev\lib
usb-win32-bin-1.2.4.0\include;C:\dev\pcsc-lite-1.7.2\lib;C:\Program Files (x86)\
CMake 2.8\bin;C:\MinGW64\lib;

Thank you for your help.

Re: libnfc for Beginners

Are you sure you set correctly PCSC_LIBRARIES value in cmake ? I don't know how to set it from command line, you can set it for sure using cmake-gui.
You should set it to C:/MinGW64/x86_64-w64-mingw32/lib/libwinscard.a

Hope this helps

Leo

Re: libnfc for Beginners

normally setting this manually should not be necessary, the FindPCSC.cmake module should be able to determine this if everything is installed and the path is set up correctly.
The path seems OK on first sight, can you check if the file winscard.h exists in directory C:\MinGW64\x86_64_w64-mingw32\include ?

Re: libnfc for Beginners

Yes the PCSC_LIBRARIES is set correctly. In cmake-gui i don't have errors but it just doesn't work. What libnfc should I use? I'm using libnfc-1.4.2 on windows vista. Now I moved on Windows 7 because I thought it was a problem of vista but i still got the same error.

Re: libnfc for Beginners

Ok what about the LIBUSB_LIBRARIES and LIBUSB_INCLUDE_DIRS? thank you

Re: libnfc for Beginners

Should be found automatically as well if you install it like described in the README file.
It looks in your Program Files directory for a LibUSB-Win32 directory. Note that you should rename the dll file as described.

Re: libnfc for Beginners

I have installed finally the libnfc but when i execute nfc-list i got
nfc-list use libnfc 1.4.2
No NFC device found.

When my Smartcard reader ACR122U is connected

Re: libnfc for Beginners

Hello,

Turn ON debug mode, that could help to find what is going wrong.

You could also try the development version.

Romuald Conty