Hi!
To test cryptoki / access to smart card we have the code below.
Does anyone know why the function C_Initialize from the cryptoki header file
is not accessible?
Thanks.
Carla
----------- Code ---------------------------
#include <stdio.h>
#include <opensc/cryptoki.h>
int main (void) {
CK_RV r;
CK_INFO info;
r = C_Initialize(NULL_PTR);
if (r != CKR_OK) {
fprintf(stderr, "C_Initialize() failed -code 0x%x\n", r);
exit(1);
}
fprintf(stderr, "C_Initialize() succeeded!\n");
C_Finalize(NULL_PTR);
}
----------- Error---------------------
ReadCert.c: In function `main':
/tmp/ccvfY2Ep.o(.text+0x16): In function `main':
: undefined reference to `C_Initialize'
/tmp/ccvfY2Ep.o(.text+0x3c): In function `main':
: undefined reference to `C_Finalize'
collect2: ld returned 1 exit status