I am trying to use the libfprint in my Qt application
#include <QtGui/QApplication>
#include "mainwindow.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <libfprint/fprint.h>
int main(int argc, char *argv[])
{
int r = 1;
struct fp_dscv_dev *ddev;
struct fp_dscv_dev **discovered_devs;
struct fp_dev *dev;
struct fp_print_data *data;
r = fp_init();
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
Compiling throws this error
/concept/main.cpp:31: undefined reference to `fp_init()'
I have been battling w开发者_StackOverflowith this for a while now. Any idea what I can do to get past this point? Thanks in advance!
It's a problem with your linker - it cannot find necessary libraries. Did you pass necessary linker switches (something like -lfoo
) instructing it to link with library you are trying to use?
精彩评论