From 85e552321041f352d801ef7638a6325c5c0ce4e3 Mon Sep 17 00:00:00 2001 From: Kubo Takehiro Date: Sun, 15 Mar 2020 09:37:42 +0900 Subject: [PATCH] Add extern "C" to allow header inclusion from C++ (fix #15) --- include/funchook.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/funchook.h b/include/funchook.h index 228d60c..0890bc0 100644 --- a/include/funchook.h +++ b/include/funchook.h @@ -30,6 +30,10 @@ #ifndef FUNCHOOK_H #define FUNCHOOK_H 1 +#ifdef __cplusplus +extern "C" { +#endif + /* * Only functions with FUNCHOOK_EXPORT are visible from outside of funchook.dll * or libfunchook.so. Others are invisible. @@ -119,4 +123,8 @@ FUNCHOOK_EXPORT const char *funchook_error_message(const funchook_t *funchook); */ FUNCHOOK_EXPORT int funchook_set_debug_file(const char *name); +#ifdef __cplusplus +} // extern "C" +#endif + #endif