설치하고 이것저것 해보다보니 링크시에 에러도 발생하고 제대로 설치된 게 아니었더군요.
오늘 다시 삽집(삽질 좀 꽤 했습니다. 흠...)하고 설치방법이 바뀌어서 수정했습니다. STLport와 boost를 플랫폼SDK를 사용하지 않고 컴파일했습니다.



아래는 VC++ 6 에 STLport 4.6.2과 boost 1.31를 설치한 과정입니다.
STLport iostreams 을 사용하는 경우와 사용하지 않는 경우로 나눠서 설명하고 설치된 STLport를
이용해서 boost를 설치하는 방법을 적었습니다.


STLport 4.6.2 설치하기


1. STLport 다운받기
STLport는 http://www.stlport.org/download.html에서 받을 수 있습니다.


2. STLport 압축풀기
STLport-4.6.2.tar.gz 파일을 압축을 푼 다음 src 디렉토리로 이동한다.
저의 경우 D:\STLport-4.6.2 에 풀었습니다.


4. STLport 컴파일과 설치
STLport iostreams를 사용하는 경우와 사용하지 않는 경우로 나누어서 설명하겠습니다.
아래 과정은 플랫폼SDK를 사용하지 않고 설치한 경우입니다. 플랫폼SDK를 사용하지 않고 컴파일하기 위해
vcvars32.bat 를 실행한 다음 컴파일했습니다.
플랫폼SDK를 사용하실 분들은 아래 참고를 읽어주세요.

* 참고(플랫폼SDK를 사용하여 STLport를 컴파일하는 경우)
플랫폼SDK를 설치하면 환경변수 INCLUDE에 플랫폼SDK경로 부터 들어있습니다. vcvars32.bat를 실행하지 말고
컴파일합니다. 컴파일할때 "InterlockedXXX"관련 에러가 발생하는데
stl_user_config.h 의 다음 부분에 있는 주석을 지우면 됩니다. stlport\stl_user_config.h 파일의 다음 부분에 있는
주석을 지우고 컴파일합니다.
# define _STLP_NEW_PLATFORM_SDK 1

4-1. STLport iostreams를 이용할 경우
아래의 명령을 주면 STLport iostreams를 빌드하고 해당 디렉토리로 설치합니다.
copy 안 하시고 nmake -f 파일명 clean all 이런 식으로 하셔도 됩니다.

vcvars32.bat
copy vc6.mak makefile
nmake clean all
nmake install

nmake install 후에 VC++이 C:\Program Files\Microsoft Visual Studio에 설치되어 있다면
lib, dll 파일은 C:\Program Files\Microsoft Visual Studio\VC98\Lib에
헤더 파일들은 C:\Program Files\Microsoft Visual Studio\VC98\Include\stlport
설치됩니다.

4-2. STLport iostreams를 이용하지 않을 경우
바이너리 파일이 필요없기 때문에 컴파일 과정이 없습니다)
stlport/stl_user_config.h 파일의 다음 부분의 주석을 지우고 stlport 디렉토리를 자신이 사용할 디렉토리에 옮겨서 사용합니다.
# define   _STLP_NO_OWN_IOSTREAMS   1


5. include 디렉토리 지정
VC++ 메뉴에서 Tools -> Options -> Directories 탭에서 Include Files 목록에 4-1이나 4-2의 stlport
경로를 지정해 줍니다. 여기서는 "C:\Program Files\Microsoft Visual Studio\VC98\Include\stlport"
이 됩니다.
라이브러리는 기본적으로 지정된 "C:\Program Files\Microsoft Visual Studio\VC98\Lib" 에 설치되기
때문에 설정해 줄 필요가 없습니다.




boost 1.31 설치하기
아래 설치 방법은 STLport를 이용한 boost 라이브러리를 컴파일해고 설치하는 방법입니다.


1. boost 1.31 다운받기
http://www.boost.org 의 Download에서 다운로드 받는다. SourceForge로 연결되네요.
여기에서 boost_1_31_0.tar.bz2 와 bjam-3.1.9-1-ntx86.zip 를 받습니다.
패치된 파일이 있다면 패치파일도 받습니다. 지금은 regex 패치 파일이 다음과 같은 파일명으로
올려져 있습니다. boost-1.31.0-regex-patch-20040503.zip


2. 압축풀기
다운로드 받은 boost_1_31_0.tar.bz2 을 압축을 풉니다. bjam-3.1.9-1-ntx86.zip 안에 들어있는
bjam.exe를 압축을 푼 boost 디렉토리에 넣습니다. 저의 경우 (D:\boost_1_31_0 에 풀었습니다.)


3. 패치하기
패치압축파일에 들어있는 readme.txt파일을 읽어보시면 지정된 디렉토리에 소스 파일들을 복사하라고 쓰여있습니다.

4. vcvars32.bat 실행

3. bjam 실행하기
bjam에 install 옵션을 주고 실행시키면 C: 드라이브에 Boost라는 디렉토리를 만들고 include, lib 디렉토리에
헤더 파일과 컴파일한 lib, dll 파일을 복사합니다. stage라는 옵션을 주면 설치는 하지 않고 stage라는 디렉토리에
컴파일한 lib, dll 파일 생깁니다.

3-1. STLport iostreams를 사용하지 않는 경우
도스창에서 다음과 같이 입력하면 됩니다. 각 옵션에 대한 설명은 3-2에서 하겠습니다.
 bjam --prefix=c:\boost -sTOOLS=msvc-stlport -sSTLPORT_PATH=D: -sSTLPORT_VERSION=4.6.2 install


3-2 STLport iostreams를 사용하는 경우
기본설정이 사용하지 않음으로 되어 있기때문에 따로 설정을 해주어야합니다. BUILD옵션에 stlport-iostream를
on으로 설정합니다. 이 경우에는 아래와 같습니다. (한줄로 적어야 합니다.)

bjam --prefix=c:\boost \
     -sTOOLS=msvc-stlport \
     -sSTLPORT_PATH=D: \
     -sSTLPORT_VERSION=4.6.2 \
     -sBUILD="debug release <runtime-link>static/dynamic <threading>single/multi <stlport-iostream>on <stlport-cstd-namespace>global" install

각 옵션에 대해 설명을 드리면
--prefix: 설치될 디렉토리
-sSTLPORT_PATH: stlport-x.x.x 형식의 디렉토리가 있는 디렉토리 저의 경우 D:\STLport-4.6.2에 풀었기때문에 d: 라고 적었습니다.
-sSTLPORT_VERSION: 디렉토리 찾을 때 사용되기 때문에 D:\STLport-4.6.2 와 일치되도록 적습니다.
-sBUILD: 빌드옵션
<stlport-iostream>on 만 적어주면 debug모드로만 컴파일됩니다. 그 앞부분도 적어주어야 하더군요.
<stlport-cstd-namespace>global 는 컴파일하면서 vsprintf가 global namespace에 없다고
에러가 발생해서 적어주었습니다.


4. VC++ 셋팅
STLport 설치의 5번 처럼 include, library 디렉토리를 지정해줍니다.
include 디렉토리는 "C:\Boost\include\boost-1_31"로 boost-1_31까지 지정합니다.
소스에서는 #include <boost/regex.hpp>이런 식으로 boost를 적어주어야 합니다.

* 참고
다들 알고 계실꺼라 생각합니다만 혹시 모르시는 분들이 있을까봐 아래 추가합니다.
include 디렉토리와 library 디렉토리를 설정하는 부분이 Tools -> Options -> Directories에만 있는 것은 아닙니다.
STLport나 boost 라이브러리는 설치가 안 되어있는 환경도 있으니 Project Settings에 지정해 놓는 것도 좋습니다.
그 프로젝트에 필요한 헤더파일 경로와 라이브러리 경로를 dsp 파일에 저장시킬 수 있니까 소스를 관리할 때
약간은 편하리라 생각됩니다.
저의 경우에는 VC++을 설치했을때 기본적으로 추가되어있지 않은 헤더파일 경로나 라이브러리 경로는 Project Settings에
지정합니다.

- 헤더 파일 경로 추가
C/C++ 탭에서 Preprocessor를 선택하시고 Additional include directories 에 헤더 파일 경로를 적어줍니다.
여러 경로를 적어 줄때는 comma(',')로 구분하고 적어주시면 됩니다.

- 라이브러리 파일 경로 추가 (라이브러리가 별도의 경로에 있을때)
Link 탭에서 Input을 선택하시고 Additionnal library path 에 라이브러리 경로를 적어줍니다.
마찬가지로 여러 경로를 적어 줄때는 comma(',') 구분하고 적어주시면 됩니다.

원문: http://www.dinkumware.com/vc_fixes.html

(as of 10 Nov 02)

---

The following bug fixes correct problems in the Standard C++ Library that accompanies Microsoft Visual C++ V5.0 and V6.0. Each replacement header file supplied here is represented as a .txt file, so you can view it directly with a web browser. You can also install the replacement file directly from the browser while you are viewing it -- simply select File/Save As File and store the file with the appropriate name in the include directory. YOU ARE STRONGLY ENCOURAGED TO SAVE THE EXISTING HEADER BEFORE OVERWRITING IT.

For example, to replace the header <deque> in a typical VC++ V5.0 installation, choose the directory:

c:\Program Files\DevStudio\VC\include

and save the file with the name deque. Note that some browsers insist on saving the file with the name deque.txt, in which case you will have to rename the file after saving it from the browser.

Be warned that updating a header file does not necessarily trigger a recompilation. You may have to force a rebuild to see the effect of a change.

Note also that some header-file information is captured in DLLs supplied by Microsoft. If you encounter a conflict, you must either avoid using the DLL (by linking statically) or rebuild the offending DLL. We still can supply no information on how to rebuild the standard DLLs shipped with VC++. (Microsoft insists that it's too difficult to describe.)

It is always a good idea to apply the latest Microsoft service pack to upgrade your compiler. Many problems quietly disappear when you do so. For example, you can now get V5.0 SP3 and V6.0 SP3.

DISCLAIMER

The files presented here are copyright ?1995-2000 by P.J. Plauger. All rights reserved. They are for use only in conjunction with a valid license for Microsoft Visual C++ V5.0 or V6.0. Microsoft Corporation is in no way involved with the production or release of these files. The files are offered on an ``as is'' basis. DINKUMWARE, LTD. AND P.J. PLAUGER MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THESE FILES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. DINKUMWARE, LTD. AND P.J. PLAUGER SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING THESE FILES.


Fix to <algorithm>

The internal template algorithm _Buffered_merge (two versions) fails to initialize local variables in two places. Change the code as indicated by the comments:

    if (_D2 < _D1)
        {_D1n = _D1 / 2, _D2n = 0;    // clear _D2n
        _Fn = _F;
        advance(_Fn, _D1n);
        _Ln = lower_bound(_M, _L, *_Fn);
        _Distance(_M, _Ln, _D2n); }
    else
        {_D1n = 0, _D2n = _D2 / 2;    // clear _D1n
        _Ln = _M;
        advance(_Ln, _D2n);
        _Fn = upper_bound(_F, _M, *_Ln);
        _Distance(_F, _Fn, _D1n); }

And for the version with predicate:

    if (_D2 < _D1)
        {_D1n = _D1 / 2, _D2n = 0;    // clear _D2n
        _Fn = _F;
        advance(_Fn, _D1n);
        _Ln = lower_bound(_M, _L, *_Fn, _P);
        _Distance(_M, _Ln, _D2n); }
    else
        {_D1n = 0, _D2n = _D2 / 2;    // clear _D1n
        _Ln = _M;
        advance(_Ln, _D2n);
        _Fn = upper_bound(_F, _M, *_Ln, _P);
        _Distance(_F, _Fn, _D1n); }
Fixes to <deque>

The header <deque> (updated 18 October 1999 to V2.33, the latest shipped version) presented here corrects a problem with the representation of the iterator that designates the end of the controlled sequence. If the sequence exactly fills the last allocated block, incrementing the iterator that designates the last element can yield a value that does not match the value returned by end(). The larger the elements stored in the container, the more likely this situation will arise.

The fix is to ensure that every iterator has just one possible representation. For added security, the ends of the container are now guarded with null map pointers. It is no longer possible to step an iterator off either end of the sequence. (Such protection is not required by the C++ Standard, but it makes for nicer failure modes in buggy code.)

 
Fix to <fstream>

(Added 13 October 1999.) The header <fstream> defines template class basic_filebuf (among other things. Its member function _Init contains a bug that causes files opened by name to disable buffering unnecessarily, resulting in a serious degradation of performance. Change the test:

if (_Fp != 0 && !_Closef && sizeof (_E) == 1)

to:

if (_Fp != 0 && sizeof (_E) == 1)

to eliminate this problem.

 
Fix to <istream>

The header <istream> contains a definition for member function basic_istream::getline. It has a lookahead problem -- typing a delimiter to end the input doesn't return control until you type yet another character. Change the code as indicated by the comment:

    else if (_C == _Di)
        {++_Chcount;
        rdbuf()->snextc();    // replace snextc with sbumpc
        break; }

Note that V6.0 replaces snextc with stossc. It is an adequate fix, but you can also apply the above patch safely.


Fix to <list>

(updated 7 July 1998) Both versions of the member function list::sort misplace elements if asked to sort a container with more than 32,768 elements. To fix the first version, change the code as indicated by the comment:

        if (_I == _MAXN)
            _A[_I].merge(_X);
    // SHOULD BE    _A[_I - 1].merge(_X);

Also change the corresponding line in the second version:

        if (_I == _MAXN)
            _A[_I].merge(_X, _Pr);
    // SHOULD BE    _A[_I - 1].merge(_X, _Pr);

You might also consider increasing _MAXN from 15 to, say 25. That way, you would have to sort a list of more than 32 million elements, instead of 32 thousand, before the performance begins to degrade.


Fix to <memory>

Template class auto_ptr creates two owners for an object if you copy an auto_ptr object back to a previous owner that still stores the same object pointer. To eliminate this problem, change the code in auto_ptr::operator= as indicated by the comment:

    else if (_Y._Owns)
        _Owns = true;    // _Owns = true, _Y.release();

Note that this template class has been redesigned more than once since this version of the library was frozen. No attempt is made here to track those changes.

 
Fix to <sstream>

(Added 12 November 1999.) Class basic_stringbuf grows its buffer by fixed-size increments, which can be very slow if the buffer gets very large. To grow the buffer exponentially, replace the line in basic_stringbuf::overflow that reads:

    size_t _Ns = _Os + _Alsize;

with:

    size_t _Ns = (_Os < _Alsize) ? _Os + _Alsize : 2 * _Os + 1;
Fix to <string>

The header <string> contains a definition for template function getline. It has a lookahead problem -- typing a delimiter to end the input doesn't return control until you type yet another character. Change the code as indicated by the comment:

    else if (_Tr::eq(_C, _D))
        {_Chg = true;
        _I.rdbuf()->snextc();    // replace snextc with sbumpc
        break; }
Fix to <vector>

The header <vector> sometimes fails to extend a vector properly. In two versions ofinsert, change the code as shown:

        _Destroy(_First, _Last);
        allocator.deallocate(_First, _End - _First);
        _End = _S + _N;
        _Last = _S + size() + _M;
        _First = _S; }

        _Destroy(_First, _Last);
        size_type _O = size();    // add this statement
        allocator.deallocate(_First, _End - _First);
        _End = _S + _N;
        _Last = _S + _O + _M;    // was _Last = _S + size() + _M;
        _First = _S; }
Fix to <xmemory>

Template class _Destroy has an unfortunate interaction with a bug in the VC++ compiler. It gets confused if you ask it to destroy an object of a class that defines the name _Ty. (Template class complex is one such creature.) The best workaround is to replace the template parameter _Ty with a really strange name, as in:

        // TEMPLATE FUNCTION _Destroy
template<class _Xyzzy> inline
    void _Destroy(_Xyzzy _FARQ *_P)
    {_DESTRUCTOR(_Xyzzy, _P); }
Fixes to <xstring>

The header <xstring> (original 25 May 1998) presented here corrects a problem with string assignments. Assigning a shorter sequence to an existing string can cause the old string to be copied in full to the newly allocated area, thus causing a storage overwrite, and an occasional storage leak as a result. In rarer circumstances, a string is partially altered by a replace member function before the copy on write occurs, thus causing changes to an apparently unrelated string object.

The fix is a small but significant change to the private member function _Grow. Several calls to _Freeze, to force a copy on write, are also added.

Please note that this implementation is still not as thread safe as it should be, because of the reference-counted implementation. A write to a ``copy'' of a string in one thread can confuse a read of that string in another thread, because the two still secretly share the same representation. One way to ensure that the non-const string str has a private representation is to call str.begin(). (By creating a mutable iterator into the string, you rule out sharing of representations.) Another way is to disable reference-counting altogether, making string operations thread safe. Simply change the value of _FROZEN to zero:

    enum _Mref {_FROZEN = 255};  // set to zero to disable sharing
Fix to <xtree>

The header <xtree> (original 25 June 1998) presented here eliminates all need for thread locks and corrects a number of thread-safety issues for template classes map, multimap, set, and multiset. It also solves some nasty problems with sharing these classes across DLLs. Note that no attempt has been made to retrofit the changes needed to make these template classes exception safe in the sense required by the final C++ Standard. (The headers map and set once presented here have been dropped as of 4 April 1999 -- they were effectively unchanged over the shipped versions.)

Fix to strftime.c

The Microsoft C library file strftime.c (original 28 March 2000) fails to supply locale information needed for the %X conversion specifier used by template class time_put. To fix the problem, add the missing line shown below to the function _Gettnames. Change the code from:

    s += strlen(strcpy(s, pt->ww_ldatefmt)) + 1;
    pn->ww_timefmt = s; }

to:

    s += strlen(strcpy(s, pt->ww_ldatefmt)) + 1;
    pn->ww_timefmt = s;
    strcpy(s, pt->ww_timefmt); }

NB: You need to make this change even if you licensed the v3.08 upgrade library from Dinkumware. We do not supply a replacement for it.

사용자 삽입 이미지

파이어폭스3의 속도에 매료되어 설치하고 사용하면서 아쉬웠던 점에 구글 툴바가 설치되지 않는 문제였다.
구글툴바 중에서도 북마크 기능을 제일 유용하게 사용했는데, 아쉬운 대로 GMark를 설치해서 사용하다가
혹시나 하고 구글툴바를 새로 설치했더니 6월 5일에 업데이트되었습니다.
파이어폭스3 출시도 초읽기에 들어간 상태에서 구글에서 업데이트 했나봅니다.
암튼 대만족 ^____^

+ Recent posts