C++实现的BSON bson-cpp的编译
2015-07-24 15:16
531 查看
C++实现的BOSN bson-cpp的编译
flyfish 2015-7-24
编译环境:
VC2010 64位
需要配置Boost库
这里的Boost配置是
Boost库的目录在E:\LIB\boost64
它的下级内容是
配置属性-》C/C++-》常规-》附加包含目录
E:\LIB\boost64
链接器-》常规-》附加库目录 或者 库管理器-》附加库目录
E:\LIB\boost64\stage\lib
在bsonspec.org中有一个C++实现的BSON github.com/jbetnet/bson-cpp
A standalone C++ BSON implementation forked from the MongoDB C++ driver, with the non-BSON code pruned away.
一个独立的,从MongoDB C++驱动分叉的C++ BSON实现,删除了与BSON无关的代码。
github下载地址
https://github.com/jbenet/bson-cpp
错误1
TIME_UTC”: 不是“boost”的成员
C++ 11定义了TIME_UTC这个宏,为了避免冲突,Boost将TIME_UTC修改为TIME_UTC_
错误2
“sleep”: 不是“boost”的成员
“thread”:“::”左侧的符号必须是一种类型
void sleep(system_time const& abs_time);
查1.58.0版boost文档对sleep的解析
[Warning] Warning
DEPRECATED since 3.0.0.
Use this_thread::sleep_for() or this_thread::sleep_until().
警告:
该函数已被启用 使用this_thread::sleep_for()或者this_thread::sleep_until()
sleep_until()
Effects:
Suspends the current thread until the time point specified by abs_time has been reached.
作用:
挂起当前线程直到指定的abs_time时间点到来
sleep_for()
Effects:
作用:
Suspends the current thread until the duration specified by by rel_time has elapsed.
挂起当前线程直到指定持续时间rel_time
一个是time point时间点,一个是duration持续的时间
这里使用boost::this_thread::sleep_for
将boost::thread::sleep(xt);
boost::this_thread::sleep_for(boost::chrono::seconds(xt.sec));
编译成功的源码下载地址
下载地址
flyfish 2015-7-24
编译环境:
VC2010 64位
需要配置Boost库
这里的Boost配置是
Boost库的目录在E:\LIB\boost64
它的下级内容是
配置属性-》C/C++-》常规-》附加包含目录
E:\LIB\boost64
链接器-》常规-》附加库目录 或者 库管理器-》附加库目录
E:\LIB\boost64\stage\lib
在bsonspec.org中有一个C++实现的BSON github.com/jbetnet/bson-cpp
A standalone C++ BSON implementation forked from the MongoDB C++ driver, with the non-BSON code pruned away.
一个独立的,从MongoDB C++驱动分叉的C++ BSON实现,删除了与BSON无关的代码。
github下载地址
https://github.com/jbenet/bson-cpp
错误1
TIME_UTC”: 不是“boost”的成员
C++ 11定义了TIME_UTC这个宏,为了避免冲突,Boost将TIME_UTC修改为TIME_UTC_
错误2
“sleep”: 不是“boost”的成员
“thread”:“::”左侧的符号必须是一种类型
void sleep(system_time const& abs_time);
查1.58.0版boost文档对sleep的解析
[Warning] Warning
DEPRECATED since 3.0.0.
Use this_thread::sleep_for() or this_thread::sleep_until().
警告:
该函数已被启用 使用this_thread::sleep_for()或者this_thread::sleep_until()
sleep_until()
Effects:
Suspends the current thread until the time point specified by abs_time has been reached.
作用:
挂起当前线程直到指定的abs_time时间点到来
sleep_for()
Effects:
作用:
Suspends the current thread until the duration specified by by rel_time has elapsed.
挂起当前线程直到指定持续时间rel_time
一个是time point时间点,一个是duration持续的时间
这里使用boost::this_thread::sleep_for
将boost::thread::sleep(xt);
boost::this_thread::sleep_for(boost::chrono::seconds(xt.sec));
编译成功的源码下载地址
下载地址
相关文章推荐
- c++vector简单实现
- /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./xxxx
- C++中引用不能重新赋值的理解
- C++利用Crypto++,vs2005环境下的RSA应用
- C++对象模型2--指针cout结果
- (转)C++ STL中list的用法
- 关于C++二维指针
- C语言中对结构体或数组清零的最快方法
- 【C++】用C编写一个my2DAlloc函数,可以分配二维数组。
- C++实现“隐藏实现,开放接口”的方案
- Sublime2 配置python 和 c++
- 关于C\C++运行时库的多线程版本的工作记录
- C++ STL,ATL,WTL之间的联系和区别
- 关于直方图规范化的C++编程实现_2015_7_24
- Effective C++:规定27:尽量少做动作的过渡
- 关于C语言中的预处理指令
- C++ 线程(一)
- c语言 curl
- 【C++】编写一个智能指针类。
- 北航13年机试--十进制数字的科学计数法表示的C语言实现