On Wednesday 08 Sep 2010 8:24:17 am Guus Ellenkamp wrote:
> Hi,
> 
> Thanks for your reply.
> 
> I am trying to use the version that comes with my package. I'm using Ubuntu 
> and just installed 'libfprint-dev'. Tried the IDE and now tried just using a 
> makefile.
> 
> Errors I get are 'undefined reference to fp_init(), fp_discover_devs() and 
> fp_dscv_free(fp_dscv_dev**). The code compiles ok.
> 
> My makefile is:
> 
> all: test
> 
> test: test.o devicehandling.o
>       g++ test.o devicehandling.o -lfprint -o test
> 
> test.o: test.c
>       g++ -c test.c
> 
> devicehandling.o: devicehandling.c
>       g++ -c devicehandling.c
> 
> clean: 
>       rm -rf *o hello
> 
> I am familiar with programming, mostly using IDE, but not with using 
> makefiles and shared libraries and not with Linux.
> 

Don't use g++ (the C++ front-end) - it's trying to do name-mangling.
The fprint.h file doesn't have C++ guards like:

#ifdef __cplusplus
extern "C" {
#endif
....
....
#ifdef __cplusplus
}
#endif

Check this for more information on how to mix C++ and C code:
http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html

Kunal
_______________________________________________
fprint mailing list
[email protected]
http://lists.reactivated.net/mailman/listinfo/fprint

Reply via email to