블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-20 00:00

1. 여기에서 Boost installer 를 다운받습니다.

2. Boost installer 를 실행하면 license agreement 거치고 난 후, 어디에서 다운 받을 것인지 묻습니다.

boost installer

boost installer

3. 그럼 자신의 개발 환경과 어떤 구성을 설치할 것인지 묻습니다.

사용자 삽입 이미지

4. 그리고 나면 어느 디렉토리에 설치할 것인지 묻고(디폴트는 C:\Program Files\boost\boost_1_35_0 입니다)

사용자 삽입 이미지

5. 그리고 나면 설치를 시작합니다.

사용자 삽입 이미지

6. 설치가 끝나고 나면 Visual Studio 설정을 해줘야 합니다.
도구->옵션->프로젝트 및 솔루션->VC++ 디렉토리 를 선택하신 후에 포함 파일(Include directories) 및 라이브러리 파일(Library directories)을 각각 다음과 같이 설정하시면 됩니다.

C:\Program Files\boost\boost_1_35_0
C:\Program Files\boost\boost_1_35_0\lib

(당연히 C:\Program Files\boost\boost_1_35_0 를 4단계에서 여러분이 선택한 디렉토리로 바꿔주시면 됩니다)

7. Visual Studio 설정이 끝나면 한 번 제대로 설정이 됐는지 확인해 봐야겠지요. 먼저 boostex 라는 이름으로 Win32 콘솔 응용 프로그램 프로젝트를 생성합니다.

사용자 삽입 이미지

그리고 나서 다음 소스를 입력해 보세요(아래 예제는 Boost의 정규식 라이브러리를 사용하는 예제로 Boost의 정규식 라이브러리는TR1에 포함됐었고, 머지 않아 C++0x에도 포함될 예정입니다).

#include <boost/regex.hpp>
#include <iostream>
#include <string>

int main()
{
    std::string line;
    boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" );

    while (std::cin)
    {
        std::getline(std::cin, line);
        boost::smatch matches;
        if (boost::regex_match(line, matches, pat))
            std::cout << matches[2] << std::endl;
    }
}


솔루션을 빌드한 후 아무런 에러 없이 빌드가 완료되면 제대로 설치하신 것입니다. 테스트삼아 실행하시려면 다음과 같은 텍스트 파일을 만드신 후 

(email.txt 파일 입력)
To: George Shmidlap
From: Rita Marlowe
Subject: Will Success Spoil Rock Hunter?
---
See subject.

다음과 같이 실행해 보시면 E-mail의 제목만 꺼내는 걸 확인할 수 있습니다.

D:\Documents and Settings\김윤수\My Documents\Visual Studio 2008\Projects\boostex\Debug>boostex.exe < email.txt
Will Success Spoil Rock Hunter?


그럼, Happy boosting 하세요~



출처 : http://yesarang.tistory.com/239

반응형

'Programming > boost' 카테고리의 다른 글

Boost 라이브러리 설치  (0) 2012.07.22
Posted by blueasa
, |