Boost Library

asio(TCP/UDP/IPv4/IPv6ネットワーク通信)目当てで使ってみることにした。
Leopardに最新の1.35をコンパイルして、インストールしてみたけど、
実行ファイルを作成する段階でこける。

$ gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5470.3~2/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5470) (Aspen 5470.3)

$ ld -v
@(#)PROGRAM:ld PROJECT:ld64-82.5

$ gcc -O2 -I/usr/local/include/boost-1_35 -L/usr/local/lib study.cpp
...
"std::basic_string, std::allocator >::_Rep::_S_empty_rep_storage", referenced from:
__ZNSs4_Rep20_S_empty_rep_storageE$non_lazy_ptr in cc6NGM1C.o
"std::cout", referenced from:
__ZSt4cout$non_lazy_ptr in cc6NGM1C.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

原因がよくわからない。もう少し調べてみる。

CentOSでは、問題無しだったのでしばらくは、Linuxで勉強する。