Skip to content

Patching Boost 1.61 for Visual Studio 2013

François Beaune edited this page Sep 27, 2016 · 1 revision

Working around a crash on exit in Debug mode

The runtime library of Visual Studio 2013 and earlier has a bug that will cause appleseed to crash when exiting. One of the solution to this problem is to patch Boost according to the instructions below.

The inspiration for this patch comes directly from this Boost ticket.

Apply the following patch with patch -p0 < thispatch:

--- libs/filesystem/src/path.cpp
+++ libs/filesystem/src/path.cpp
@@ -878,7 +878,7 @@
   {
 # if defined(BOOST_WINDOWS_API)
     std::locale global_loc = std::locale();
-    return std::locale(global_loc, new windows_file_codecvt);
+    return std::locale(global_loc, new windows_file_codecvt(1));
 # elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
   || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
     // "All BSD system functions expect their string parameters to be in UTF-8 encoding
Clone this wiki locally