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://docs.xojo.com/Shell

That makes sense - thank you.

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.