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.
This commit is contained in:
Ray molenkamp 2022-04-08 12:52:35 -06:00
parent eb40b231f9
commit 4f96190122
1 changed files with 8 additions and 0 deletions

View File

@ -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