From 8ac9e1307fb548668b344b1cc8b624a9af0b69c9 Mon Sep 17 00:00:00 2001 From: David Williams Date: Sun, 7 Mar 2010 23:04:17 +0000 Subject: [PATCH] .dll export code now checks do Microsoft compiler rather than Windows. This should make G++ work properly on Windows. --- library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h b/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h index f011b159..7f0a0d3e 100644 --- a/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h +++ b/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h @@ -26,13 +26,15 @@ freely, subject to the following restrictions: #ifndef __PolyVox_TypeDef_H__ #define __PolyVox_TypeDef_H__ -#ifdef WIN32 //Should be is Visual studio (to allow MinGW) +#ifdef _MSC_VER + //We are using a Microsoft compiler. #ifdef POLYVOXCORE_EXPORT #define POLYVOXCORE_API __declspec(dllexport) #else #define POLYVOXCORE_API __declspec(dllimport) #endif #else + //Assume a GNU compiler. #define POLYVOXCORE_API __attribute__ ((visibility("default"))) #endif