水曜日, 11月 15, 2006

MacOS XにSTLportを入れる

1. STLportから,STLport 5.1.0 RC3をダウンロードしてくる.

2. STLport-5.1.0/stlport/stl/config/features.hに以下のパッチを当てる.
--- STLport-5.1.0/stlport/stl/config/features.h Sat Aug  5 18:11:19 2006
+++ STLport-5.1.0-apple/stlport/stl/config/features.h Wed Nov 15 01:07:56 2006
@@ -187,6 +187,12 @@
# else
# define _STLP_LITTLE_ENDIAN 1
# endif
+# elif defined (__APPLE__)
+# if defined (__BIG_ENDIAN__)
+# define _STLP_BIG_ENDIAN 1
+# else
+# define _STLP_LITTLE_ENDIAN 1
+# endif
# else
# error "can't determine endianess"
# endif

2.5 MacOS X Tigerの場合STLportのディレクトリに,C++のincludeディレクトリへのシンボリックリンクを作成する必要がある (2006/11/18 追加)
# ln -s /usr/include/c++/4.0.0 STLport-5.1.0/c++

3. makeする
% cd STLport-5.1.0/build/lib
% make -f gcc.mak clean all install

4. /usr/local以下にコピーする
% su
# tar cf - stlport | (cd /usr/local/include; tar xf -)
# chmod -R a+r /usr/local/include/stlport
# chown -R root:wheel /usr/local/include/stlport
# (cd lib; tar cf - --exclude=CVS --exclude=.cvsignore .) | (cd /usr/local/lib; tar xf -)
# chown -R root:wheel /usr/local/lib/libstlport*
# exit

0 件のコメント: