Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2022-04-08 21:52:35 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-11 01:32:00 +0300
commitb82c13c174a5358259e3218793864949b338e05a (patch)
tree78af8e1047ae79ce6187f8ac88f0a71f0e660793
parent5450da5becfda01ab7a6d9c2010065929bcddcc0 (diff)
Fix: Build issue with MSVC
draw_common.h was included in a C++ file leading to the linker looking for the decorated name for `G_draw` which lead to a linker error. adding an extern "C" for C++ fixes the issue.
-rw-r--r--source/blender/draw/intern/draw_common.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_common.h b/source/blender/draw/intern/draw_common.h
index e2dc91f64be..34b930ae9c8 100644
--- a/source/blender/draw/intern/draw_common.h
+++ b/source/blender/draw/intern/draw_common.h
@@ -9,6 +9,10 @@
#include "draw_common_shader_shared.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct DRWShadingGroup;
struct FluidModifierData;
struct GPUMaterial;
@@ -92,3 +96,7 @@ struct DRW_Global {
struct GPUUniformBuf *view_ubo;
};
extern struct DRW_Global G_draw;
+
+#ifdef __cplusplus
+}
+#endif