I’m attempting to write a C program using libfprint, and it throws an undefined reference error when I attempt to compile something like:
#include <stdio.h>
#include <libfprint-2/fprint.h>
int main() {
if (fp_init() != 0) {
printf("Failed to initialize libfprintn");
return 1;
} else {
printf("libfprint initialized successfully!!n");
}
}
This is how I complied it:
cc -o my_fprint_app my_fprint_app.c $(pkg-config --cflags --libs libfprint-2)
How can I solve this?
I was expecting to see one of the print statements, but instead the program didn’t even compile.
New contributor
Lebogang Masia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.