Raspbian Declares for libnfc

I’m a little new to both Declares and Raspbian. I’d like to get an NFC device working with Xojo. I can see the device using the raspbian terminal and i2cdetect, nfc-poll and nfc-list, but I can’t see how to translate these library commands into Xojo Declares.

I’ve tried things like:

Soft Declare Function NFC_LIST Lib "nfc-list" () As cString
Return NFC_LIST()

But I get a FunctionNotFoundException on the pi.

I feel I’m missing a step somewhere…

nfc-list is a utility, not a function in a lib. The way you probably want is to call it and get its output.

Use shell for that:

https://documentation.xojo.com/api/os/shell.html

That makes sense - thank you.

1 Like