From 3a0f1c41262ad12e69c5efd56308bdfe2a48ed6a Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 3 Feb 2014 23:05:07 -0600 Subject: [PATCH] Windows name export tweak --- include/kiway.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/kiway.h b/include/kiway.h index 632ac308a4..efef894340 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -106,11 +106,14 @@ as such! As such, it is OK to use UTF8 characters: #define KIFACE_VERSION 1 #define KIFACE_GETTER KIFACE_1 -// Adjust the spelling of this in a platform specific way if need be. The -// KIFACE acquistion function is declared extern "C" so its name should not -// be mangled. Keep the trailing version number in sync with the KIFACE_GETTER -// define above. -#define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1" +// The KIFACE acquistion function is declared extern "C" so its name should not +// be mangled (much). Windows has leading underscore for our C function. +// Keep the trailing version number in sync with the KIFACE_GETTER define above. +#if defined(__MINGW32__) + #define KIFACE_INSTANCE_NAME_AND_VERSION "_KIFACE_1" +#else + #define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1" +#endif #if defined(__linux__)