Boost C++ Libraries: Ticket #4804: boost/thread/thread.hpp "error: cast from 'void*' to 'long int'" with mingw64 https://svn.boost.org/trac10/ticket/4804 <p> On Windows 7 x64, using mingw64, when I build a source file that #include &lt;boost/thread/thread.hpp&gt;, there are the following errors : </p> <pre class="wiki">In file included from C:\Boost\include\boost-1_44/boost/thread/win32/thread_data.hpp:12:0, from C:\Boost\include\boost-1_44/boost/thread/thread.hpp:15, from test.cpp:1: C:\Boost\include\boost-1_44/boost/thread/win32/thread_heap_alloc.hpp:59:40: warning: inline function 'void* boost::detail::allocate_raw_heap_memory(unsigned int)' declared as dllimport: attribute ignored C:\Boost\include\boost-1_44/boost/thread/win32/thread_heap_alloc.hpp:69:39: warning: inline function 'void boost::detail::free_raw_heap_memory(void*)' declared as dllimport: attribute ignored In file included from C:\Boost\include\boost-1_44/boost/thread/win32/basic_timed_mutex.hpp:14:0, from C:\Boost\include\boost-1_44/boost/thread/win32/mutex.hpp:8, from C:\Boost\include\boost-1_44/boost/thread/mutex.hpp:14, from C:\Boost\include\boost-1_44/boost/thread/detail/thread.hpp:13, from C:\Boost\include\boost-1_44/boost/thread/thread.hpp:22, from test.cpp:1: C:\Boost\include\boost-1_44/boost/thread/win32/interlocked_read.hpp: In function 'void boost::detail::interlocked_write_release(void* volatile*, void*)': C:\Boost\include\boost-1_44/boost/thread/win32/interlocked_read.hpp:71:13: error: cast from 'void*' to 'long int' loses precision In file included from C:\Boost\include\boost-1_44/boost/thread/win32/mutex.hpp:8:0, from C:\Boost\include\boost-1_44/boost/thread/mutex.hpp:14, from C:\Boost\include\boost-1_44/boost/thread/detail/thread.hpp:13, from C:\Boost\include\boost-1_44/boost/thread/thread.hpp:22, from test.cpp:1: C:\Boost\include\boost-1_44/boost/thread/win32/basic_timed_mutex.hpp: In member function 'void* boost::detail::basic_timed_mutex::get_event()': C:\Boost\include\boost-1_44/boost/thread/win32/basic_timed_mutex.hpp:183:43: error: cast from 'void*' to 'long int' loses precision </pre><p> test case : </p> <pre class="wiki">#include &lt;boost/thread/thread.hpp&gt; int main(void) { return 0; } </pre><p> Thanks in advance, </p> <p> David </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4804 Trac 1.4.3 gdavid.devel@… Sat, 30 Oct 2010 07:17:10 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4804#comment:1 https://svn.boost.org/trac10/ticket/4804#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">fixed</span> </li> </ul> <p> Missing #define BOOST_USE_WINDOWS_H. </p> Ticket