Boost logo

Boost Users :

Subject: Re: [Boost-users] [Random] Good Truly-Random Seed
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-04-22 16:54:10


AMDG

Hossein Haeri wrote:
> Dear Peter,
>
>> Just replace random_device.cpp with the new version:
>>
>> http://svn.boost.org/svn/boost/trunk/libs/random/src/random_device.cpp
>>
>
> I'm afraid that doesn't work. Please see the P.S. for the compiler-log if it helps.
>
> Best,
> --Hossein
>
> P.S.
>
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:34: warning: ignoring #pragma comment
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:36: error: expected constructor, destructor, or type conversion before "const"
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp: In constructor `boost::random_device::impl::impl(const std::string&)':
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:49: error: `CryptEnumProvidersA' was not declared in this scope
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:49: warning: unused variable 'CryptEnumProvidersA'
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp: In member function `void boost::random_device::impl::error(const std::string&)':
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:80: warning: unused variable 'error_code'
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp: At global scope:
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:169: error: `BOOST_RANDOM_DECL' does not name a type
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:175: error: `BOOST_RANDOM_DECL' does not name a type
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:182: error: expected constructor, destructor, or type conversion before "double"
> D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:187: error: expected constructor, destructor, or type conversion before "unsigned"
>

It looks like mingw defines its own versions of
windows.h and wincrypt.h that are missing a
few declarations. Try the attached patch against 1.42.

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