From a287e6e884977ba018c01370bbee1ee6032110ef Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 7 Oct 2016 14:28:39 +0200 Subject: [PATCH] WXEXTEND_API is defined according to WXEXTEND_DLL and WXEXTEND_DLLIMP constants instead of WXEXTEND now --- build/wxExtend.props | 3 --- build/wxExtendDll.props | 6 +++++- include/wxex/common.h | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build/wxExtend.props b/build/wxExtend.props index 24d03f5..d87c385 100644 --- a/build/wxExtend.props +++ b/build/wxExtend.props @@ -8,9 +8,6 @@ ..\..\..\output\$(Platform).$(Configuration)\ - - WXEXTEND;%(PreprocessorDefinitions) - $(OutDir)..\locale\%(Filename)\$(ProjectName)$(wxExtendVersion).mo diff --git a/build/wxExtendDll.props b/build/wxExtendDll.props index 9a6fcf7..7aff24d 100644 --- a/build/wxExtendDll.props +++ b/build/wxExtendDll.props @@ -5,6 +5,10 @@ - + + + WXEXTEND_DLL;%(PreprocessorDefinitions) + + \ No newline at end of file diff --git a/include/wxex/common.h b/include/wxex/common.h index 3a60bed..af7458c 100644 --- a/include/wxex/common.h +++ b/include/wxex/common.h @@ -48,14 +48,14 @@ /// /// Public function calling convention /// -#ifdef WXEXTEND -#ifdef _WINDLL -#define WXEXTEND_API __declspec(dllexport) +#ifndef WXEXTEND_API +#if defined(WXEXTEND_DLL) +#define WXEXTEND_API __declspec(dllexport) +#elif defined(WXEXTEND_DLLIMP) +#define WXEXTEND_API __declspec(dllimport) #else #define WXEXTEND_API #endif -#else -#define WXEXTEND_API __declspec(dllimport) #endif