[Orxonox-commit 3851] r8527 - code/trunk/src/libraries/core

landauf at orxonox.net landauf at orxonox.net
Sun May 22 10:15:23 CEST 2011


Author: landauf
Date: 2011-05-22 10:15:22 +0200 (Sun, 22 May 2011)
New Revision: 8527

Modified:
   code/trunk/src/libraries/core/GUIManager.cc
Log:
build fix for mingw, d_ostream.open() is not defined for wchar

Modified: code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- code/trunk/src/libraries/core/GUIManager.cc	2011-05-21 12:44:08 UTC (rev 8526)
+++ code/trunk/src/libraries/core/GUIManager.cc	2011-05-22 08:15:22 UTC (rev 8527)
@@ -64,7 +64,7 @@
 #  include <OgreSceneManager.h>
 #endif
 
-#ifdef ORXONOX_PLATFORM_WINDOWS
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_COMPILER_MINGW)
 #  include <windows.h>
 #endif
 
@@ -120,7 +120,7 @@
             if (d_ostream.is_open())
                 d_ostream.close();
 
-#ifdef ORXONOX_PLATFORM_WINDOWS
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_COMPILER_MINGW)
             // filename.c_str() is UTF-8 encoded, but Windows expects characters
             // according to the current codepage or UTF-16 (wchar)
             d_ostream.open(utf8ToUtf16(filename.c_str()).c_str(), std::ios_base::out | (append ? std::ios_base::app : std::ios_base::trunc));
@@ -155,7 +155,7 @@
             }
         }
 
-#ifdef ORXONOX_PLATFORM_WINDOWS
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_COMPILER_MINGW)
         /// Converts a UTF-8 character sequence to Windows UTF-16
         static std::wstring utf8ToUtf16(const std::string& utf8text)
         {




More information about the Orxonox-commit mailing list