Closed OlivierGre closed 4 months ago
Thanks.
# Linux
PCSC_CFLAGS := $(shell pkg-config --cflags libpcsclite)
LDFLAGS := $(shell pkg-config --libs libpcsclite)
It is not clear to me where I should get the library libpcsclite.
I can do consulting. Contact me by email.
Thanks for the proposal.
For information, the proposed makefile was not working on my side (it was failing at linker stage). Here is a makefile working for me:
CC=gcc
CFLAGS=$(shell pkg-config --cflags libpcsclite)
# Mac OS X
#CFLAGS=-framework PCSC
LDFLAGS=$(shell pkg-config --libs libpcsclite)
.PHONY: all
all: sample
.PHONY: clean
clean:
$(RM) *~ *.o sample
OBJECTS=sample.o
sample: $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) -o sample $(LDFLAGS)
I'm using a HID 5022 CL reader connected to a Raspberry Pi board. I have installed the following packages to be able to communicate with the HID reader:
I'm then able to use the "pcsc_scan" command to communicate with the HID reader and see the content of a smartcard.
I now would like to do the same in a C/C++ program running on the raspberry. Is it possible to use PCSC as a library and call the PCSC-lite API? If yes, would you have some example showing how to do that?
Thank you