LudovicRousseau / pcsc-tools

Some tools to be used with smart cards and PC/SC
https://pcsc-tools.apdu.fr/
GNU General Public License v2.0
195 stars 62 forks source link

can not compile under windows #65

Closed totti0858 closed 1 year ago

totti0858 commented 1 year ago

Under Windows 10, try to install the msys2 as suggested and download the latest code from github.

run the command: ./configure, then failed with: -bash: ./configure: No such file or directory

run the command: autoconf , then failed with error. configure.ac:10: warning: 'AM_CONFIG_HEADER': this macro is obsolete. configure.ac:10: You should use the 'AC_CONFIG_HEADERS' macro instead. ../autoconf-2.71/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from... aclocal.m4:1089: AM_CONFIG_HEADER is expanded from... configure.ac:10: the top level configure.ac:62: warning: The macro `AC_HEADER_STDC' is obsolete. configure.ac:62: You should run autoupdate. ../autoconf-2.71/lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from... configure.ac:62: the top level

run the command: autoreconf -ivf, it passed. Then run the command ./configure gain, it failed at: checking for SCardEstablishContext... configure: error: SCardEstablishContext() not found, install pcsc-lite, or use PCSC_LIBS=... ./configure

How can I fix this issue?

LudovicRousseau commented 1 year ago

Maybe use something like:

PCSC_LIBS=-lwinscard ./configure

See https://ludovicrousseau.blogspot.com/2017/05/pcscscan-on-windows.html

totti0858 commented 1 year ago

Thanks for your help and I can compile it now.

Could you please update your page (https://ludovicrousseau.blogspot.com/2017/05/pcscscan-on-windows.html) then others will easily overcome this difficult.