From c576c9174b2dd0b084f6e158043808d856767f27 Mon Sep 17 00:00:00 2001 From: Rico P Date: Thu, 31 Mar 2022 14:59:00 +0200 Subject: [PATCH] add extern "C" macro for C++ --- src/sfd.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sfd.h b/src/sfd.h index 8149f3e..38a7f39 100644 --- a/src/sfd.h +++ b/src/sfd.h @@ -10,6 +10,10 @@ #define SFD_VERSION "0.1.0" +#if defined(__cplusplus) +extern "C" { +#endif + typedef struct { const char *title; const char *path; @@ -22,4 +26,8 @@ const char* sfd_get_error(void); const char* sfd_open_dialog(sfd_Options *opt); const char* sfd_save_dialog(sfd_Options *opt); +#if defined(__cplusplus) +} +#endif + #endif