Boost C++ Libraries: Ticket #10325: Win32: including file_lock.hpp results in compilation error https://svn.boost.org/trac10/ticket/10325 <p> Today I switched from Boost 1.55.0 to 1.56.0 and now get the following error just for including file_lock.hpp: </p> <p> <strong>error: invalid conversion from 'boost::interprocess::winapi::farproc_t {aka int (<span class="underline">attribute</span>((<span class="underline">stdcall</span>)) *)()}' to 'void*' [-fpermissive]</strong> </p> <pre class="wiki">In file included from d:\mingw\mingw32\i686-w64-mingw32\include\boost\interprocess\errors.hpp:37:0, from d:\mingw\mingw32\i686-w64-mingw32\include\boost\interprocess\exceptions.hpp:20, from d:\mingw\mingw32\i686-w64-mingw32\include\boost\interprocess\sync\file_lock.hpp:20, from src\init.cpp:38: d:\mingw\mingw32\i686-w64-mingw32\include\boost\interprocess\detail\win32_api.hpp: In instantiation of 'static void* boost::interprocess::winapi::function_address_holder&lt;Dummy&gt;::get(unsigned int) [with int Dummy = 0]': d:\mingw\mingw32\i686-w64-mingw32\include\boost\interprocess\detail\win32_api.hpp:1614:20: required from here d:\mingw\mingw32\i686-w64-mingw32\include\boost\interprocess\detail\win32_api.hpp:1541:31: error: invalid conversion from 'boost::interprocess::winapi::farproc_t {aka int (__attribute__((__stdcall__)) *)()}' to 'void*' [-fpermissive] return FunctionAddresses[id]; ^ </pre><p> Used compiler: gcc version 4.8.1 (rev5, Built by MinGW-W64 project) </p> <p> OS: Win8.1 x64 </p> <p> IDE: Qt Creator 3.1.2 (Qt 5.3.1) </p> <p> I verified that the project compiles fine, if the file_lock stuff is commented out. I'm going to watch this thread, so I don't supply my email address. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10325 Trac 1.4.3 Ion Gaztañaga Thu, 14 Aug 2014 11:52:23 GMT <link>https://svn.boost.org/trac10/ticket/10325#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10325#comment:1</guid> <description> <p> This should be fixed in both develop and master branches, sadly it wasn't in time for Boost 1.56. </p> </description> <category>Ticket</category> </item> <item> <author>dmitry.s.petrov@…</author> <pubDate>Sun, 07 Sep 2014 16:00:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10325#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10325#comment:2</guid> <description> <p> Hi guys, </p> <p> It there any workaround or patch for this issue except downgrading to 1.55? </p> <p> Thanks in advance, Dmitry </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 07 Sep 2014 19:52:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10325#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10325#comment:3</guid> <description> <p> Just wanted to confirm the problem also on Win XP GCC 4.8.1 (no MSYS). Excluding the file 'file_lock.hpp' by using the command line option -DBOOST_INTERPROCESS_FILE_LOCK_HPP did not help as similar problem pops up in 'win32_api.hpp'. Downgrading to Boost 1.55.0 solved the issue. </p> <p> --Nik </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Sun, 07 Sep 2014 21:00:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10325#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10325#comment:4</guid> <description> <p> A fix for this didn't enter in Boost 1.56 release timeline but it should be fixed in the develop branch. You might want to replace your file with </p> <p> <a href="http://www.boost.org/doc/libs/develop/boost/interprocess/detail/win32_api.hpp">http://www.boost.org/doc/libs/develop/boost/interprocess/detail/win32_api.hpp</a> </p> <p> and test if the bug was corrected. </p> </description> <category>Ticket</category> </item> </channel> </rss>