Skip to content

boost 1.35 build

2016.05.01 20:22

WHRIA 조회 수:50

http://zzang2k.egloos.com/v/2446291

 

0. 참고

- Getting Started on Windows: http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html

- Boost.Jam: http://www.boost.org/doc/tools/jam/index.html

 

1. 개요

- 일반적으로 boost 라이브러리를 사용하기 위해서는 단순히 헤더 파일만 include 시켜주면 된다. 하지만, 언제나 그렇듯이 몇 가지 예외사항이 있다. 특정 라이브러리들은 꼭 빌드해서 사용해야 한다. boost 라이브러리는 ACE와 같이 따로 솔루션 파일을 제공하지 않고, bjam이라는 툴을 사용해 라이브러리 빌드에 사용한다. 바로 bjam을 사용해서 boost 라이브러리를 빌드하는 방법을 설명한다. (실제로는 나중에 까먹을까봐 적어둔다.)

 

2. 다운로드 및 압축 해제

- 최신 버전 또는 사용할 버전의 boost 라이브러리를 다운로드한 다음 적당한 디렉터리에 압축을 해제한다.

- http://www.boost.org/users/download/

- 현재 최신 버전: Boost 1.35.0 - "boost_1_35_0.tar.gz"

- 압축 해제 디렉터리: "D:\boost_1_35_0"

 

3. bjam 빌드

- 이미 컴파일된 bjam 파일을 받을 수도 있지만 boost 라이브러리에 포함되어 있는 소스에서 bjam 실행 바이너리 파일을 빌드할 수 있다.

- "D:\boost_1_35_0\tools\jam\src" 디렉터리에서 "build.bat vc8" 명령만 실행하면, 잠시 뒤에 "D:\boost_1_35_0\tools\jam\src\bin.ntx86" 디렉터리에서 빌드된 "bjam.exe" 바이너리 파일을 볼 수 있을 것이다.

- 실제 boost 빌드에 사용하기 위해서 "bjam.exe" 파일을 최상위 디렉터리 ("D:\boost_1_35_0")에 복사한다.

 

D:\boost_1_35_0\tools\jam\src>build.bat vc8
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
###
### Using 'vc8' toolset.
###


D:\boost_1_35_0\tools\jam\src>rd /S /Q bootstrap
지정된 파일을 찾을 수 없습니다.


D:\boost_1_35_0\tools\jam\src>md bootstrap


D:\boost_1_35_0\tools\jam\src>cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib /Febootstrap\jam0  command.c compile.c debug.c execnt.c expand.c filent.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst
.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c  modules/property-set.c modules/sequence.c modules/order.c
command.c
compile.c
debug.c
execnt.c


...(생략)...

 

4. boost 빌드

- 이제 boost를 빌드하기만 하면 된다. bjam으로 빌드할 때 install 하는 방법과 stage 하는 방법이 있는데 여기서는 stage 옵션을 사용해서 빌드를 한다.

- 아래와 같이 "bjam --build-type=complete --build-dir="D:\boost_1_35_0\build" --toolset=msvc stage" 명령을 실행하면, 오랫동안 라이브러리가 빌드하는데 시간을 보낼 것이다.

- "D:\boost_1_35_0\build" 디렉터리는 빌드에 사용되어 아래에 오브젝트 파일들이 생성된다.

- "D:\boost_1_35_0\stage" 디렉터리 아래에는 lib 디렉터리가 생성되고, 빌드가 완료된 lib, dll 파일들이 생성된다. 이 파일들을 사용하면 된다. ^^

- --build-type=complete 옵션을 주면 약 2GB 라이브러리 파일이 생성된다. 시간도 엄청 걸린다. 이 옵션을 주지 않으면 release용 라이브러리 파일만 생성된다.

D:\boost_1_35_0>bjam --build-type=complete --build-dir="D:\boost_1_35_0\build" --toolset=msvc stage


warning: Graph library does not contain optional GraphML reader.
note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the
note: directories containing the Expat headers and libraries, respectively.
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
WARNING: No python installation configured and autoconfiguration
         failed.  See http://www.boost.org/libs/python/doc/building.html
         for configuration instructions or pass --without-python to
         suppress this message and silently skip all Boost.Python targets
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(don't panic: this is a strictly optional feature).
Skipping build of:  libs/python/build/boost_python  <build>no in common properties


...(생략)...


D:\Project\bbbbb\boost_1_35_0\stage\lib\boost_wserialization-vc80-mt.lib??(??) ?
??? ?? ????????.
        1?? ?????? ??????????????.
common.hard-link stage\lib\boost_signals-vc80-mt.lib
D:\Project\bbbbb\boost_1_35_0\stage\lib\boost_signals-vc80-mt.lib??(??) ???? ??
????????.
        1?? ?????? ??????????????.
...updated 274 targets...

번호 제목 글쓴이 날짜 조회 수
1656 single file encrypt decrypt WHRIA 2020.05.17 1725
1655 encfs WHRIA 2020.05.17 32767
1654 CE WHRIA 2020.05.17 33
1653 식약청 메뉴 WHRIA 2020.05.14 45
1652 android / capture and crop [5] WHRIA 2020.05.10 37
1651 webapp [1] WHRIA 2020.05.10 41
1650 software validation [1] WHRIA 2020.05.10 51
1649 startup WHRIA 2020.05.08 53
1648 개명 WHRIA 2020.05.05 64
1647 acquihire [1] WHRIA 2020.05.05 42
1646 annotation service WHRIA 2020.05.03 45
1645 conflict of interest WHRIA 2020.05.03 35
1644 exif javascript orientation WHRIA 2020.04.30 44
1643 kfda [5] WHRIA 2020.04.29 80
1642 mysql python reconnect [2] WHRIA 2020.04.25 184

Powered by Xpress Engine / Designed by Sketchbook

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소