Boost logo

Boost Users :

Subject: [Boost-users] Boost Thread Compile Issue
From: Len Za (tz3689_at_[hidden])
Date: 2016-02-25 11:25:34


When simply including into C++ project and attempting to compile causes the following compile error:

Environment:
- Visual Studio 2010 Pro (Project Configuration: DLL project)
- boost v1.60.0
    C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(99): error C2146: syntax error : missing ';' before identifier 'curr'
          C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(81) : while compiling class template member function 'boost::posix_time::ptime boost::date_time::microsec_clock<time_type>::create_time(boost::date_time::microsec_clock<time_type>::time_converter)'
          with
          [
              time_type=boost::posix_time::ptime
          ]
          C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/thread/thread_time.hpp(22) : see reference to class template instantiation 'boost::date_time::microsec_clock<time_type>' being compiled
          with
          [
              time_type=boost::posix_time::ptime
          ]
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(99): error C2065: 'curr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(100): error C2065: 'curr_ptr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(100): error C2065: 'curr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(101): error C2065: 'curr_ptr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(101): error C2227: left of '->tm_year' must point to class/struct/union/generic type
          type is ''unknown-type''
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(102): error C2065: 'curr_ptr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(102): error C2227: left of '->tm_mon' must point to class/struct/union/generic type
          type is ''unknown-type''
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(103): error C2065: 'curr_ptr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(103): error C2227: left of '->tm_mday' must point to class/struct/union/generic type
          type is ''unknown-type''
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(111): error C2065: 'curr_ptr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(111): error C2227: left of '->tm_hour' must point to class/struct/union/generic type
          type is ''unknown-type''
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(112): error C2065: 'curr_ptr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(112): error C2227: left of '->tm_min' must point to class/struct/union/generic type
          type is ''unknown-type''
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(113): error C2065: 'curr_ptr' : undeclared identifier
C:\src\SDK\Boost\boost_1_60_0\boost_1_60_0\boost/date_time/microsec_time_clock.hpp(113): error C2227: left of '->tm_sec' must point to class/struct/union/generic type
          type is ''unknown-type''



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