Boost error, trouble compiling xtime.hpp

For those running into the same issue and struggling to find the solution here. Derived from noodlebox' link (https://svn.boost.org/trac/boost/ticket/6940):

You can edit /usr/include/boost/thread/xtime.hpp (or whereever your xtime.hpp lies) and change all occurrences of TIME_UTC to TIME_UTC_ - Probably around lines 23 and 71.

i.e. sed -i 's/TIME_UTC/TIME_UTC_/g' /usr/include/boost/thread/xtime.hpp


If you're getting syntax errors when using Boost, you may need to compile your code with -std=c++11.

The TIME_UTC issue you might have read about is a side effect of using c++11. TIME_UTC is now defined as a macro in c++11, so you will need to either replace all instances of TIME_UTC with TIME_UTC_, or just use a newer (1.50.0+) version of Boost where this has been fixed already.

See: https://svn.boost.org/trac/boost/ticket/6940