I am trying to use erlang-pcsc from @arekinath.
But that is my first Erlang program and I blocked on a stupid problem
I created a sample code at GitHub - LudovicRousseau/erlang-pcsc-sample: Sample code of PC/SC in Erlang
I use rebar3 escriptize
to create a binary.
Then I start it using:
$ ./_build/default/bin/blog
Hello world!
escript: exception error: undefined function pcsc_card_db:list_readers/0
in function escript:run/2 (escript.erl, line 750)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
My code does not find the pcsc functions. I guess it is trivial to fix once you know Erlang a bit more.
My goal is to add an Erlang PC/SC sample to Ludovic Rousseau's blog: PC/SC sample in different languages
I also tried:
$ rebar3 shell
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling blog
Erlang/OTP 24 [erts-12.3.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]
Eshell V12.3.1 (abort with ^G)
1> ===> Booted blog
pcsc_card_db:list_readers().
** exception exit: {noproc,{gen_server,call,[pcsc_card_db,list_readers]}}
in function gen_server:call/2 (gen_server.erl, line 239)
2>
Here the function list_readers()
is found but I get an exception.
Sorry to ask stupid questions. Can someone help?