NFC on linux |undefined reference to `nfc_init'|

hi everyone and happy coding to you all !

i am trying to build a little program, by using ofxNFCReader… on Linux
and i did everything to deal with it (correctly i think), Codeblocks keep saying this to me:

can you told me where is the problem? i a bit new in Linux, and it looks quite difficult to me :frowning:

||=== Build: Debug in nfc (compiler: GNU GCC Compiler) ===|

…/…/…/addons/obj/linux/Debug/ofxNFCReader/src/ofxNFCReader.o||In function `ofxNFCReader::open(int)’:expressionless:

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|43|undefined reference to `nfc_init’|

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|45|undefined reference to `nfc_open’|

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|52|undefined reference to `nfc_initiator_init’|

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|53|undefined reference to `nfc_perror’|

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|58|undefined reference to `nfc_device_get_name’|

…/…/…/addons/obj/linux/Debug/ofxNFCReader/src/ofxNFCReader.o||In function `ofxNFCReader::close()’:expressionless:

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|69|undefined reference to `nfc_close’|

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|70|undefined reference to `nfc_exit’|

…/…/…/addons/obj/linux/Debug/ofxNFCReader/src/ofxNFCReader.o||In function `ofxNFCReader::threadedFunction()’:expressionless:

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|113|undefined reference to `nfc_initiator_poll_target’|

/home/scale/Desktop/of/apps/myApps/example/…/…/…/addons/ofxNFCReader/src/ofxNFCReader.cpp|121|undefined reference to `str_nfc_target’|

||=== Build failed: 9 error(s), 0 warning(s) (0 minute(s), 14 second(s)) ===|

thank you for your patience and have a happy day :slight_smile:

seems like that addon only has the 32bit linux version of libnfc, you can just install it in the system using:

sudo apt-get install libnfc-dev

Thank for your reply… but… it still not working: it is making the same errors. :frowning:

you’ll probably need to add:

PLATFORM_CFLAGS=-lnfc -lusb

in your projects config.make

still the same problem…
do you think i missed something when i install this libs, like :
acscssid-1.0.8
libusb-1.0.9
pcsc-lite-1.5.3

this is what i had to install to make it work normally. maybe it come from here ? (noob in linux)