From 5a7c561d48500c55aae8d4aea594d1c371269eb1 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Mon, 2 Nov 2009 07:46:29 +0000 Subject: [PATCH] Add C++ compatibility, this fix Issue 16. --- src/libnfc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libnfc.h b/src/libnfc.h index 25045fb..588acf9 100644 --- a/src/libnfc.h +++ b/src/libnfc.h @@ -32,6 +32,10 @@ #include "defines.h" #include "types.h" +#ifdef __cplusplus + #define NFCAPI extern "C" { +#endif // __cplusplus + /** * @fn dev_info* nfc_connect(nfc_device_desc_t* pndd) * @brief Connect to a NFC device @@ -231,5 +235,10 @@ bool nfc_target_send_bytes(const dev_info* pdi, const byte_t* pbtTx, const size_ */ bool nfc_target_send_dep_bytes(const dev_info* pdi, const byte_t* pbtTx, const size_t szTxLen); +#ifdef __cplusplus +} +#endif // __cplusplus + + #endif // _LIBNFC_H_