Compilation of Bosn Bson-cpp implemented by C + +
Flyfish 2015-7-24
Compilation Environment:
VC2010 64-bit
Need to configure the boost library
In bsonspec.org, there is a C + + implementation of Bosn Github.com/jbetnet/bson-cpp
A Standalone C + + BSON implementation forked from the MongoDB C + + driver, with the Non-bson code pruned away.
A standalone, C + + Bson implementation that drives forks from MongoDB C + +, removing code unrelated to Bson.
GitHub
Https://github.com/jbenet/bson-cpp
Error 1
TIME_UTC ": Not a member of" boost "
C + + 11 defines TIME_UTC as a macro that, in order to avoid collisions, boost TIME_UTC to Time_utc_
Error 2
"Sleep": not a member of "boost"
"Thread": "::" the symbol on the left must be of type
void Sleep (System_time const& abs_time);
Check the 1.58.0 version of the boost document for sleep parsing
[Warning] Warning
DEPRECATED since 3.0.0.
Use This_thread::sleep_for () or This_thread::sleep_until ().
Warning:
The function has been enabled using This_thread::sleep_for () or This_thread::sleep_until ()
Sleep_until ()
Effects:
Suspends the current thread until the time point specified by Abs_time have been reached.
Role:
Suspends the current thread until the specified abs_time time point arrives
Sleep_for ()
Effects:
Role:
Suspends the current thread until the duration specified by by Rel_time have elapsed.
Suspends the current thread until the specified duration rel_time
One is time point, one is duration duration
Use boost::this_thread::sleep_for here
The Boost::thread::sleep (XT);
Boost::this_thread::sleep_for (Boost::chrono::seconds (xt.sec));
Compile the successful source code
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Compilation of Bosn Bson-cpp implemented by C + +