浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

// test_for_static_lib.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <cstdio>
#include<iostream>
#include<boost/any.hpp>
int _tmain(int argc, _TCHAR* argv[])
{
    boost::any a(5);
    a=7.67;
    std::cout<<boost::any_cast<double>(a)<<std::endl;
    printf("%d",1);
    getchar();
    return 0;
}

 

 

下载单独静态编译好的lib,

以及window下的boost包,用于include 头文件

在工程的属性上选择头文件所在路径

在c++ general下选择Additonal Include Directories:放置头文件路径

D:\Documents\Downloads\boost_1_52_0\boost_1_52_0

 

在Linker general下选择Additonal Include Directories:放置静态库路径

C:\mao\lib32

 

 

参考文章

http://blog.csdn.net/visame/article/details/2804332

posted on 2013-01-10 16:29  lexus  阅读(208)  评论(0编辑  收藏  举报