boost 설치

C++ 2011. 8. 17. 21:23
boost/shared_ptr
boost/unordered_map
boost/unordered_set
boost/assign/list_of
boost::bind
boost::regex
boost::object_pool
boost::graph
boost::spirit
datetime
smart pointer
preprocessor
function

boost 테스트 : http://en.highscore.de/cpp/boost/
boost 테스트 라이브러리 : http://www.boost.org/doc/libs/1_42_0/libs/test/doc/html/index.html

boost pro : http://www.boostpro.com/download/

32bit
압축 해제

cmd> cd boost_1_46_1\tools\build\v2
cmd> bootstrap.bat

hpp 만 사용시
압축 해제 후 boost_1_46_1 폴더를 인클루드 디렉토리로 잡아 사용.

컴파일 해야 사용할 수 있는 모듈
Boost.Filesystem
Boost.GraphParallel
Boost.IOStreams
Boost.MPI
Boost.ProgramOptions
Boost.Python (see the Boost.Python build documentation before building and installing it)
Boost.Regex
Boost.Serialization
Boost.Signals
Boost.System
Boost.Thread
Boost.Wave

(잘 안되면 다 지우고 새로 압축 풀어서 다시 하자.)

실행 
Microsoft Visual Studio 2010 > Visual Studio Tools > Visual Studio 명령 프롬프트(2010)
이동
cd D:\SRC\NewBaseApp\WISM\Library\install_binary\boost_install_binary\boost_1_46_1

bootstrap.bat 실행
cmd> bootstrap.bat
(bjam.exe, project-config.jam 파일 생성됨)

Visual Studio 2010 bjam 컴파일 옵션
작업할 콘솔 : Microsoft Visual Studio 2010 > Visual Studio Tools > Visual Studio x64 Cross Tools 명령 프롬프트(2010)
1. 32bit debug
cmd> bjam --stagedir=D:\boost\32bit\debug\static --build-dir=D:\boost\build toolset=msvc-10.0 address-model=32 variant=debug link=static threading=multi runtime-link=static stage
OK
2. 32bit relese
cmd> bjam --stagedir=D:\boost\32bit\release\static --build-dir=D:\boost\build toolset=msvc-10.0 address-model=32 variant=release link=static threading=multi runtime-link=static stage
OK
3. 64bit debug
cmd> bjam --stagedir=D:\boost\64bit\debug\static --build-dir=D:\boost\build toolset=msvc-10.0 address-model=64 variant=debug link=static threading=multi runtime-link=static stage
OK
4. 64bit release
cmd> bjam --stagedir=D:\boost\64bit\release\static --build-dir=D:\boost\build toolset=msvc-10.0 address-model=64 variant=release link=static threading=multi runtime-link=static stage
사용
visual studio 2010에서 생성한 라이브러리와 boost_1_46_1 폴더 인클루드 하여 boost 사용




Visual Studio 2005 
1. 32bit debug : MTd
bjam toolset=msvc-8.0 variant=debug link=static threading=multi runtime-link=static --build-type=complete -j 4

2. 32bit relese : MT
bjam toolset=msvc-8.0 variant=release link=static threading=multi runtime-link=static --build-type=complete -j 4

3. 32bit debug : MDd
bjam toolset=msvc-8.0 variant=debug link=static threading=multi runtime-link=shared --build-type=complete -j 4

4. 32bit relese : MD
bjam toolset=msvc-8.0 variant=release link=static threading=multi runtime-link=shared --build-type=complete -j 4


gtest
msvc/gtest.sln 솔루션 열기
gtest 프로젝트 컴파일(gtest.lib, gtestd.lib)
gtest-1.6.0\include