|
Installing C++ Boost on Microsoft Windows for Visual Studio .NET 2003/2005/Orcas - visame的专栏 - 博客频道 - CSDN.NET
Installing C++ Boost on Microsoft Windows for Visual Studio .NET 2003/2005/Orcas
2008-08-21 02:25 888人阅读 评论(0) 收藏 举报
Boost Consultancy has created a wizard based installer for downloading and installing the correct version of Boost components on a Windows machine for Visual Studio .NET IDEs. The Installer simplifies the process of installation by getting rid of the time-consuming, and on rare occasions error-prone, process of compilation from the sources. But if you use any IDE other than Visual Studio .NET(even the old Visual Studio 6.0 IDE) then you need to use the typical Boost installation method(). Below is the procedure to install Boost for Visual Studio .NET IDEs using the Boost Installer for Windows.
Testing Boost Installation in Visual Studio .NET 2003/2005/Orcas
Boost has two type of libraries : header-only(which are compiler independent) and compiled binary libraries.
- Testing Boost Header-only libraries:
- Start the Microsoft Visual Studio .NET IDE and create a new C++ project in it(File -> New Project). select Visual C++ -> Win32 in the left pane and Win32 Console Application/Win32 Console Project in the right pane. Enter a name(BoostDemo) for the project and click OK.http://beans.seartipy.com/wp-content/uploads/2007/08/boost/VSC++_New.jpg
- Right-click on the project name and select Properties(or select Project->BoostDemo Properties). Select Configuration Properties -> C/C++ -> General in the left pane and type/select Boost installation root directory(C:/boost/boost_1_34_1) in "Additional Include Directories" field in the right pane.http://beans.seartipy.com/wp-content/uploads/2007/08/boost/VSC++_Properties.jpg
- Add the following code just above the _tmain() function(in the generated file - BoostDemo.cpp).
Show Plain Text
C++: Add the following code with in the _tmain() function:
Show Plain Text
C++:
boost::any a(5);
a = 7.67;
std::cout
|
|