|
Boost Users : |
Subject: Re: [Boost-users] is boost 1.46.1 contain thread/read_write_mutex.hpp
From: Brian Budge (brian.budge_at_[hidden])
Date: 2011-08-04 15:11:02
On Thu, Aug 4, 2011 at 11:52 AM, Eric Lin <kingdavid1_at_[hidden]> wrote:
>
> Dear boost experts:
>
> so I follow your suggestion, add #include <
> #include <boost/thread/shared_mutex.hpp>
> ---
> but I still get compile error about
>
> root_at_eric-laptop:/home/eric/cppcookbook/ch12# g++ -lboost_thread Example12-3.cpp
> Example12-3.cpp:41:4: error: read_wirte_mutex in namespace boost does not name a type
> ------------
> about the program segment on
> -----
> private:
> std::list<T> list_;
> boost::read_wirte_mutex rwMutex_;
> };
> -----------
> do you (or any boost expert) know/suggest what kind function(subroutine) I can use to substitute it in share_mutex.hpp, so it still not deviate book author's main
> intent of the program?
> need your help and thanks a lot in advance, Eric
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> ----------------------------------------
>> Date: Thu, 4 Aug 2011 08:30:50 -0700
>> From: brian.budge_at_[hidden]
>> To: boost-users_at_[hidden]
>> Subject: Re: [Boost-users] is boost 1.46.1 contain thread/read_write_mutex.hpp
>>
>> On Wed, Aug 3, 2011 at 6:15 PM, Eric Lin <kingdavid1_at_[hidden]> wrote:
>> >
>> > dear boost progamers:
>> >
>> > when I tried to compile from my g++4.5.2 a simple file which include
>> > #include <boost/thread/read_write_mutex.hpp>
>> > -------
>> > root_at_eric-laptop:/home/eric/cppcookbook/ch12# g++ -lboost_thread Example12-3.cpp
>> > Example12-3.cpp:3:45: fatal error: boost/thread/read_write_mutex.hpp: No such file or directory
>> > compilation terminated.
>> > ---------
>> > and I check from / of my ubuntuLinux with boost 1.46.1
>> > I can not find any file name as read_wirte_mutex.hpp
>> > ---------
>> > root_at_eric-laptop:/# find . | grep read_write_mutex.hpp
>> > root_at_eric-laptop:/#
>>
>> It won't compile because that file does not exist. It sounds like
>> you should get a new cppcookbook, given the number of examples you've
>> posted about that are broken. You should probably first try emailing
>> the author of that book regarding these problems. I believe you're
>> looking for a shared_mutex.
>>
>> Brian
The code is wrong, and we cannot divine the original author's intent.
I suggest you contact the author regarding their broken code.
Brian
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