Topic: libnfc on linux

Hi i am working on a project in Ubuntu Linux and I am trying to use your Api and I can not seem to get it to compile

kd5lct@video-kun:~/libnfc$ gcc ./test.c ./libnfc.c
./test.c:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./test.c:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘abtFelica’
./test.c: In function ‘main’:
./test.c:15: error: ‘tag_info’ undeclared (first use in this function)
./test.c:15: error: (Each undeclared identifier is reported only once
./test.c:15: error: for each function it appears in.)
./test.c:15: error: expected ‘;’ before ‘ti’
./test.c:16: error: ‘pdi’ undeclared (first use in this function)
./test.c:17: error: ‘INVALID_DEVICE_INFO’ undeclared (first use in this function)
./test.c:24: error: ‘DCO_ACTIVATE_FIELD’ undeclared (first use in this function)
./test.c:27: error: ‘DCO_INFINITE_SELECT’ undeclared (first use in this function)
./test.c:30: error: ‘DCO_HANDLE_CRC’ undeclared (first use in this function)
./test.c:31: error: ‘DCO_HANDLE_PARITY’ undeclared (first use in this function)
./test.c:38: error: ‘IM_ISO14443A_106’ undeclared (first use in this function)
./test.c:38: error: ‘ti’ undeclared (first use in this function)
kd5lct@video-kun:~/libnfc$ 

can you give me some pointers please

Thanks

Jason Archip

Last edited by rainfay (2009-08-13 21:22:11)

Re: libnfc on linux

It appears that you did not include libnfc.h in your source or you did not tell to gcc where to find this file.
Try using -I option to give include path and -L to give lib paths and -l to provide libraries.
Just for example
gcc -o test test.c -I ./libnfc/include -L ./libnfc/lib -lnfc

Hope this helps

Leo

Re: libnfc on linux

Thanks

Jason Archip