C++实现的BOSN bson-cpp的编译
flyfish 2015-7-24
编译环境:
VC2010 64位
需要配置Boost库
在bsonspec.org中有一个C++实现的BOSN github.com/jbetnet/bson-cpp
A standalone C++ BSON implementation forked from the MongoDB...
分类:
编程语言 时间:
2015-07-24 16:14:07
阅读次数:
504
//简单模拟实现boost库下的shared_ptr
#include
#include
using namespace std;
class shared_ptr_Rep
{
friend class shared_ptr;
public:
shared_ptr_Rep(const char *str = " ") :count(0)
{
px = new char[st...
分类:
编程语言 时间:
2015-07-22 10:55:25
阅读次数:
141
因为跨平台的原因,现在要使用到boost库,boost库非常大,现在处于摸索阶段。首先来说boost库在window下的安装和使用。一、下载首先从boost官方主页http://www.boost.org/下载最新版boost安装包,或者使用Subversion获取最新版本,地址是:http://s...
我的经验:在强调运行效率的场合:shared_ptr/weak_ptr很好用,尤其是weak_ptr这个能够判断一个对象的生命周期的玩意,可以简化和扩展很多设计。unordered系列的容器也很不错。thread+function+bind是异步编程的利器。signal:这个因为个人比较喜事件驱动这...
分类:
其他好文 时间:
2015-07-20 09:10:22
阅读次数:
123
//模拟实现boost库下的scoped_array
#include
#include
using namespace std;
template
class scoped_array
{
private:
T * px;
scoped_array(scoped_array const &);
scoped_array& operator=(scoped_array const...
分类:
编程语言 时间:
2015-07-17 16:16:08
阅读次数:
118
//模拟实现boost下的scoped_ptr
#include
#include
using namespace std;
template
class scoped_ptr
{
private:
T * px;
scoped_ptr(scoped_ptr const &);
scoped_ptr& operator=(scoped_ptr const &);
void ...
分类:
编程语言 时间:
2015-07-17 12:01:02
阅读次数:
157
dev c++ 的boost库的安装步骤 然后点击“check for updates”按钮 最后点击“Download selected”按钮,下载完成后安装.... 给dev添加boost库文件,找到之前安装的目录#include #include#include#include#in...
分类:
编程语言 时间:
2015-07-12 21:35:23
阅读次数:
210
Windows下编译LevelDB
flyfish 2015-7-8
LevelDB是开源的存在磁盘上的key-value存储 由google的Jeffrey Dean 和Sanjay Ghemawat编写。
环境
操作系统:windows x64
编译器: VC2010
配置
需要Boost库支持,需要先将Boost库编译为64位版本
1文件-》新...
分类:
数据库 时间:
2015-07-08 18:51:56
阅读次数:
373
boost大部分库只需要包含头文件即可使用,而有部分需要编译的,如下:E:\Qt\Qt3rdlib\boost_1_58_0>bjam --show-libraries
The following libraries require building:
- atomic
- chrono
- container
- context
- coroutine...
分类:
其他好文 时间:
2015-07-05 11:07:48
阅读次数:
125
学习开源库的第一步就是,编译安装,然后我们才能写一写demo去测试。
所以本章我们学一下在linux编译安装Boost库,为了方便起见,直接安装完整库。
我使用的版本是boost_1_55_0,版本差别不大。
[mjf@localhost ~]$
tar -zxvf boost_1_55_0.tar.gz
[mjf@localhost boost_1_55_0]$
./b...
分类:
系统相关 时间:
2015-07-05 09:33:57
阅读次数:
759