From 4cfa3d02c00942cc7d29aa097723bbf33e1aef41 Mon Sep 17 00:00:00 2001 From: Jean-Sebastien Bevilacqua Date: Tue, 26 Sep 2017 12:47:42 +0200 Subject: [PATCH] Fix name mangling for C This patch force the header to be compiled as C. This behavior allows to use this library in a C program. --- src/vk_mem_alloc.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index cb4b57b..686d193 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -23,6 +23,10 @@ #ifndef AMD_VULKAN_MEMORY_ALLOCATOR_H #define AMD_VULKAN_MEMORY_ALLOCATOR_H +#ifdef __cplusplus +extern "C" { +#endif + /** \mainpage Vulkan Memory Allocator \tableofcontents @@ -1235,6 +1239,10 @@ void vmaDestroyImage( /** @} */ +#ifdef __cplusplus +} +#endif + #endif // AMD_VULKAN_MEMORY_ALLOCATOR_H // For Visual Studio IntelliSense.