From 504f49ee2657886091499532a6d66dacbf920c96 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Sat, 23 May 2020 11:58:48 +0200 Subject: [PATCH] Added workaround for a missing symbol when using an old mingw64 (e.g. 7.3). Specify the build tag mingw64_7_3 to enable the workaround. --- c_windows_static_workaround.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 c_windows_static_workaround.go diff --git a/c_windows_static_workaround.go b/c_windows_static_workaround.go new file mode 100644 index 0000000..8b8a5d7 --- /dev/null +++ b/c_windows_static_workaround.go @@ -0,0 +1,17 @@ +// +build windows,static,mingw64_7_3 + +package allg5 + +/* +#define _CRTBLD +#include + +FILE *__cdecl __acrt_iob_func(unsigned index) +{ + return &(__iob_func()[index]); +} + +typedef FILE *__cdecl (*_f__acrt_iob_func)(unsigned index); +_f__acrt_iob_func __MINGW_IMP_SYMBOL(__acrt_iob_func) = __acrt_iob_func; +*/ +import "C"