Boost logo

Boost Users :

Subject: Re: [Boost-users] boost thread on x64
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-09-10 21:27:06


AMDG

Pascal Kesseli wrote:
> Using the freshly created MinGW 64bit build, creating the boost 1.40
> libraries with bjam worked flawlessly. However, when including
> boost/thread.hpp, I receive the following error:
>
> C:\Program
> Files\C++\boost\boost_1_40_0/boost/thread/win32/interlocked_read.hpp: In
> function 'void boost::detail::interlocked_write_release(void* volatile*,
> void*)':
> C:\Program
> Files\C++\boost\boost_1_40_0/boost/thread/win32/interlocked_read.hpp:71:
> error: cast from 'void*' to 'long int' loses precision
>
>
> However, on the stated line, I can't even make out a cast. Is boost_thread
> win64 compatible?
>
> g++ version:
> g++.exe (GCC) 4.4.1 20090505 (prerelease)
> Copyright (C) 2009 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>

The cast is in the macro.

Boost seems to check _M_IA64 and _M_AMD64. Do you know what
macro(s) gcc defines for the architecture? You can also try compiling
with -DBOOST_USE_WINDOWS_H

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net