Re: [Boost-bugs] [Boost C++ Libraries] #9379: 'boost::chrono::steady_clock' has not been declared" on boost 1.55, hp-ux 11.23 IA, gcc 4.6

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9379: 'boost::chrono::steady_clock' has not been declared" on boost 1.55, hp-ux 11.23 IA, gcc 4.6
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-13 04:05:48


#9379: 'boost::chrono::steady_clock' has not been declared" on boost 1.55, hp-ux
11.23 IA, gcc 4.6
-------------------------------+--------------------------
  Reporter: gengyonghui@… | Owner: viboes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: chrono
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords: steady_clock
-------------------------------+--------------------------

Comment (by anonymous):

 Hi experts,
 The problem can be reproduced easily,
 uname -a
 HP-UX B.11.23 U ia64

 $gcc -v
 gcc version 4.6.3 (GCC)

 $cat thread.cpp

 <
 #include <string>
 #include <iostream>
 #include <boost/thread.hpp>
 using namespace std;


 class BankAccount;

 BankAccount JoesAccount;

 void bankAgent()
 {
     for (int i =10; i>0; --i) {
         //...
         JoesAccount.Deposit(500);
         //...
     }
 }

 void Joe() {
     for (int i =10; i>0; --i) {
         //...
         int myPocket = JoesAccount.Withdraw(100);
         std::cout << myPocket << std::endl;
         //...
     }
 }

 int main() {
     //...
     boost::thread thread1(bankAgent); // start concurrent execution of
 bankAgent
     boost::thread thread2(Joe); // start concurrent execution of Joe
     thread1.join();
     thread2.join();
     return 0;
 }

>

 Error:
 <
 irvspxue:builder> g++ -Iboost_1_55_0 -o thread thread.cpp
 In file included from boost_1_55_0/boost/thread/mutex.hpp:16:0,
                  from
 boost_1_55_0/boost/thread/pthread/thread_data.hpp:13,
                  from boost_1_55_0/boost/thread/thread_only.hpp:17,
                  from boost_1_55_0/boost/thread/thread.hpp:12,
                  from boost_1_55_0/boost/thread.hpp:13,
                  from thread.cpp:5:
 boost_1_55_0/boost/thread/pthread/mutex.hpp: In member function 'bool
 boost::timed_mutex::try_lock_for(const boost::chrono::duration<Rep,
 Period>&)':
 boost_1_55_0/boost/thread/pthread/mutex.hpp:309:41: error:
 'boost::chrono::steady_clock' has not been declared
 In file included from
 boost_1_55_0/boost/thread/pthread/thread_data.hpp:14:0,
                  from boost_1_55_0/boost/thread/thread_only.hpp:17,
                  from boost_1_55_0/boost/thread/thread.hpp:12,
                  from boost_1_55_0/boost/thread.hpp:13,
                  from thread.cpp:5:
 boost_1_55_0/boost/thread/pthread/condition_variable_fwd.hpp: In member
 function 'boost::cv_status
 boost::condition_variable::wait_for(boost::unique_lock<boost::mutex>&,
 const boost::chrono::duration<Rep, Period>&)':
>

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9379#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC