[chrono] Compilation with MinGW/gcc 4.4.0
I've been trying to compile the chrono "hello world" example with MinGW/GCC 4.4.0, but it fails. I then tried to compile the tests, and saw similar errors. The docs say this compiler is supported, has anyone else tried this? Here's the error chain: .\boost_1_47_0/boost/type_traits/common_type.hpp: At global scope: .\boost_1_47_0/boost/type_traits/common_type.hpp: In instantiation of 'boost::common_type<double, long long int, long long int>': .\boost_1_47_0/boost/chrono/duration.hpp:252: instantiated from 'ToDuration boost::chrono::detail::duration_cast_aux<FromDuration, ToDuration, Period, true, false>::operator()(const FromDuration&) const [with FromDuration = boost::chrono::duration<long long int, boost::ratio<1ll, 10000000ll> >, ToDuration = boost::chrono::duration<double, boost::ratio<1ll, 1ll> >, Period = boost::ratio<1ll, 10000000ll>]' .\boost_1_47_0/boost/chrono/duration.hpp:311: instantiated from 'ToDuration boost::chrono::detail::duration_cast<FromDuration, ToDuration>::operator() (const FromDuration&) const [with FromDuration = boost::chrono::duration<long long int, boost::ratio<1ll, 10000000ll> >, ToDuration = boost::chrono::duration<double, boost::ratio<1ll, 1ll> >]' .\boost_1_47_0/boost/chrono/duration.hpp:472: instantiated from 'boost::chrono::duration<Rep, Period>::duration(const boost::chrono::duration<Rep2, Period2>&, typename boost::enable_if<boost::mpl::or_<boost::chrono::treat_as_floating_point<Rep>, boost::mpl::and_<boost::chrono::chrono_detail::is_evenly_divisible_by<Period2, Period>, boost::mpl::not_<boost::chrono::treat_as_floating_point<Rep2> >, mpl_::bool_<true>, mpl_::bool_<true>, mpl_::bool_<true> >, mpl_::bool_<false>, mpl_::bool_<false>, mpl_::bool_<false> >, void>::type*) [with Rep2 = long long int, Period2 = boost::ratio<1ll, 10000000ll>, Rep = double, Period = boost::ratio<1ll, 1ll>]' ...\test.cpp:96: instantiated from here .\boost_1_47_0/boost/type_traits/common_type.hpp:77: error: no type named 'type' in 'struct boost::common_type<double, long long int, void>'
On 1:59 PM, Richard Hazlewood wrote:
I've been trying to compile the chrono "hello world" example with MinGW/GCC 4.4.0, but it fails.
I then tried to compile the tests, and saw similar errors.
The docs say this compiler is supported, has anyone else tried this?
[...]
<http://www.boost.org/development/tests/release/developer/summary.html> Two mingw-4.4 tests are in the regression matrix (32-bit & 64-bit mgw-w64).
Le 13/10/11 17:20, Richard Hazlewood a écrit :
I've been trying to compile the chrono "hello world" example with MinGW/GCC 4.4.0, but it fails.
I then tried to compile the tests, and saw similar errors.
The docs say this compiler is supported, has anyone else tried this? I have no access now to gcc-4/4. I use to compile with gcc-4.5.0,4.6.0 and all is OK.
Here's the error chain:
could you post the compiler command ? Best, Vicente
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
Le 13/10/11 17:20, Richard Hazlewood a écrit :
I've been trying to compile the chrono "hello world" example with MinGW/GCC 4.4.0, but it fails.
could you post the compiler command ?
Excluding the usual include/output specs: "-c -g -frtti -fexceptions -mthreads -Wall" Adding the "-std=c++0x" argument results in a successful compilation, as long as "__STRICT_ANSI__" is not defined (http://stackoverflow.com/questions/3445312/swprintf-and-vswprintf-not- declared). HTH.
Le 14/10/11 10:31, Richard Hazlewood a écrit :
Vicente J. Botet Escriba<vicente.botet<at> wanadoo.fr> writes:
Le 13/10/11 17:20, Richard Hazlewood a écrit :
I've been trying to compile the chrono "hello world" example with MinGW/GCC 4.4.0, but it fails.
could you post the compiler command ? Excluding the usual include/output specs: "-c -g -frtti -fexceptions -mthreads -Wall"
Adding the "-std=c++0x" argument results in a successful compilation, as long as "__STRICT_ANSI__" is not defined (http://stackoverflow.com/questions/3445312/swprintf-and-vswprintf-not- declared).
Please, could you give me the complete command line? Thanks, Vicente
participants (3)
-
Jim Bell
-
Richard Hazlewood
-
Vicente J. Botet Escriba