Skip to content

Library is potentially incompatible with Boost 1.8 #34

@TaqiHamoda

Description

@TaqiHamoda

I am trying to build the library but I get the following compilation errors:

/home/.../shared_memory/src/locked_condition_variable.cpp: In member function 'bool shared_memory::LockedConditionVariable::timed_wait(long int)':
/home/.../shared_memory/src/locked_condition_variable.cpp:64:16: error: 'boost::posix_time' has not been declared
   64 |         boost::posix_time::ptime current_time =
      |                ^~~~~~~~~~
/home/.../shared_memory/src/locked_condition_variable.cpp:66:16: error: 'boost::posix_time' has not been declared
   66 |         boost::posix_time::time_duration waiting_time =
      |                ^~~~~~~~~~
/home/.../shared_memory/src/locked_condition_variable.cpp:70:48: error: 'current_time' was not declared in this scope
   70 |                                                current_time + waiting_time);
      |                                                ^~~~~~~~~~~~
/home/.../shared_memory/src/locked_condition_variable.cpp:70:63: error: 'waiting_time' was not declared in this scope
   70 |                                                current_time + waiting_time);
      |                                                               ^~~~~~~~~~~~
/home/.../shared_memory/src/locked_condition_variable.cpp:60:47: warning: unused parameter 'wait_nano_seconds' [-Wunused-parameter]
   60 | bool LockedConditionVariable::timed_wait(long wait_nano_seconds)
      |                                          ~~~~~^~~~~~~~~~~~~~~~~

These issues were resolved when I added the #include <boost/date_time/posix_time/posix_time.hpp> header to shared_memory.hpp. There are other compilation issues that are also resolved by adding the appropriate headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions