How to use Boost in Visual Studio 2010

后端 未结 13 1258
情歌与酒
情歌与酒 2020-11-22 07:14

What is a good step by step explanation on how to use the Boost library in an empty project in Visual Studio?

13条回答
  •  执笔经年
    2020-11-22 07:22

    What parts of Boost do you need? A lot of stuff is part of TR1 which is shipped with Visual Studio, so you could simply say, for example:

    #include 
    
    using std::tr1::shared_ptr;
    

    According to James, this should also work (in C++0x):

    #include 
    
    using std::shared_ptr;
    

提交回复
热议问题