From 65b8071941f60b4a4dbb83c0e91c028c4da71225 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 18 Sep 2020 15:05:17 -0400 Subject: [PATCH] Use typedefs from xlsxio in PluginStatics.h The typedefs in the header foward-declared new structs of the same names in the DFHack namespace, e.g. DFHack::xlsxio_read_struct. Apparently the constructors that used these typedefs are not inlined on Windows, so libdfhack was compiled with a constructor taking a "DFHack::xlsxio_read_sheet_struct", and xlsxreader was looking for a constructor taking just a "xlsxio_read_sheet_struct", which didn't exist. --- library/include/PluginStatics.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/include/PluginStatics.h b/library/include/PluginStatics.h index 061fd3a21..5665fb9e6 100644 --- a/library/include/PluginStatics.h +++ b/library/include/PluginStatics.h @@ -8,6 +8,8 @@ #pragma once +#include + #include "DataIdentity.h" namespace DFHack { @@ -26,14 +28,12 @@ struct DFHACK_EXPORT xlsx_sheet_handle_identity : public compound_identity { }; struct DFHACK_EXPORT xlsx_file_handle { - typedef struct xlsxio_read_struct* xlsxioreader; const xlsxioreader handle; xlsx_file_handle(xlsxioreader handle): handle(handle) {} static xlsx_file_handle_identity _identity; }; struct DFHACK_EXPORT xlsx_sheet_handle { - typedef struct xlsxio_read_sheet_struct* xlsxioreadersheet; const xlsxioreadersheet handle; xlsx_sheet_handle(xlsxioreadersheet handle): handle(handle) {} static xlsx_sheet_handle_identity _identity;