Boost C++ Libraries: Ticket #7816: win_static_mutex.ipp compilation error https://svn.boost.org/trac10/ticket/7816 <p> boost-1_52/boost/asio/detail/impl/win_static_mutex.ipp:51:63: error: invalid conversion from 'const wchar_t*' to 'size_t {aka unsigned int}' [-fpermissive] </p> <p> boost-1_52/boost/asio/detail/impl/win_static_mutex.ipp:51:63: error: invalid conversion from 'unsigned int' to 'const wchar_t*' [-fpermissive] </p> <p> MinGW 4.7.2<br /> <em>It happens regardless to using flag -std=gnu++0x, -std=gnu++11 or their c++ counterpairs</em> </p> <p> Below is compilation log. </p> <p> d:\&gt;make -f Makefile.hands main 2&gt;&amp;1 | more<br /> </p> <pre class="wiki">g++.exe -c -g -std=gnu++11 -W -Wall -Werror -pedantic -DBOOST_SYSTEM_NO_DEPRECATED -D_WIN32_WINNT=0x0601 -ID:\Boost\incl ude\boost-1_52 -LD:\Boost\lib -LD:\MinGW\lib TransMedia.cpp -o TransMedia.o -lboost_system-mgw47-mt-d-1_52 -lboost_filesystem-mgw47-mt-d-1_52 - lboost_iostreams-mgw47-mt-d-1_52 -lws2_32 -lwsock32 -lwinmm In file included from D:\Boost\include\boost-1_52/boost/asio/detail/win_static_mutex.hpp:71:0, from D:\Boost\include\boost-1_52/boost/asio/detail/static_mutex.hpp:23, from D:\Boost\include\boost-1_52/boost/asio/detail/impl/signal_set_service.ipp:24, from D:\Boost\include\boost-1_52/boost/asio/detail/signal_set_service.hpp:210, from D:\Boost\include\boost-1_52/boost/asio/signal_set_service.hpp:19, from D:\Boost\include\boost-1_52/boost/asio/basic_signal_set.hpp:24, from D:\Boost\include\boost-1_52/boost/asio.hpp:26, from USBIrToy.h:6, from TransMedia.h:17, from TransMedia.cpp:8: D:\Boost\include\boost-1_52/boost/asio/detail/impl/win_static_mutex.ipp: In member function 'int boost::asio::detail::win_static_mutex::do_init() ': D:\Boost\include\boost-1_52/boost/asio/detail/impl/win_static_mutex.ipp:51:63: error: invalid conversion from 'const wchar_t*' to 'size_t {aka un signed int}' [-fpermissive] D:\Boost\include\boost-1_52/boost/asio/detail/impl/win_static_mutex.ipp:51:63: error: invalid conversion from 'unsigned int' to 'const wchar_t*' [-fpermissive] In file included from D:\Boost\include\boost-1_52/boost/asio/detail/impl/winsock_init.ipp:25:0, from D:\Boost\include\boost-1_52/boost/asio/detail/winsock_init.hpp:87, from D:\Boost\include\boost-1_52/boost/asio/io_service.hpp:34, from D:\Boost\include\boost-1_52/boost/asio/basic_io_object.hpp:19, from D:\Boost\include\boost-1_52/boost/asio/basic_socket.hpp:19, from D:\Boost\include\boost-1_52/boost/asio/basic_datagram_socket.hpp:20, from D:\Boost\include\boost-1_52/boost/asio.hpp:20, from USBIrToy.h:6, from TransMedia.h:17, from TransMedia.cpp:8: D:\Boost\include\boost-1_52/boost/asio/error.hpp: At global scope: D:\Boost\include\boost-1_52/boost/asio/error.hpp:244:45: error: 'boost::asio::error::system_category' defined but not used [-Werror=unused-variab le] D:\Boost\include\boost-1_52/boost/asio/error.hpp:246:45: error: 'boost::asio::error::netdb_category' defined but not used [-Werror=unused-variabl e] D:\Boost\include\boost-1_52/boost/asio/error.hpp:248:45: error: 'boost::asio::error::addrinfo_category' defined but not used [-Werror=unused-vari able] D:\Boost\include\boost-1_52/boost/asio/error.hpp:250:45: error: 'boost::asio::error::misc_category' defined but not used [-Werror=unused-variable ] In file included from D:\Boost\include\boost-1_52/boost/asio/io_service.hpp:34:0, from D:\Boost\include\boost-1_52/boost/asio/basic_io_object.hpp:19, from D:\Boost\include\boost-1_52/boost/asio/basic_socket.hpp:19, from D:\Boost\include\boost-1_52/boost/asio/basic_datagram_socket.hpp:20, from D:\Boost\include\boost-1_52/boost/asio.hpp:20, from USBIrToy.h:6, from TransMedia.h:17, from TransMedia.cpp:8: D:\Boost\include\boost-1_52/boost/asio/detail/winsock_init.hpp:78:30: error: 'boost::asio::detail::winsock_init_instance' defined but not used [- Werror=unused-variable] cc1plus.exe: all warnings being treated as errors make: *** [TransMedia.o] Error 1 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7816 Trac 1.4.3 chris_kohlhoff Sat, 29 Dec 2012 10:54:01 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7816#comment:1 https://svn.boost.org/trac10/ticket/7816#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7373" title="#7373: Bugs: Boost ASIO has a wrong swprintf interface definition for MinGW (closed: fixed)">#7373</a>. </p> Ticket