From 9f61a4881e018508e1914ddbb4e7740c11f0a272 Mon Sep 17 00:00:00 2001 From: marynate Date: Sun, 18 Jan 2015 02:06:29 +0800 Subject: [PATCH] Fix mingw windows build error --- platform/windows/os_windows.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index ce791336649..4fa061886d9 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -57,7 +57,11 @@ static const WORD MAX_CONSOLE_LINES = 1500; extern "C" { +#ifdef _MSC_VER _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; +#else + __attribute__((visibility("default"))) DWORD NvOptimusEnablement = 0x00000001; +#endif } //#define STDOUT_FILE