想要在Ubuntu 11.10 上安装如链接所示C++ library.
http://www.robots.ox.ac.uk/~vgg/software/fastcluster/我已安装如下软件:
Linux
CMake >= 2.6.0
Python >= 2.5 (but < 3.0)
MPI library (OpenMPI is recommended)
Numpy (
http://numpy.scipy.org/)
PyTables (
http://www.pytables.org/)
fastann library (
http://github.com/philbinj/fastann)
安装都如里面的README.txt所示,只是我安装在了/opt文件夹下。
但是执行make指令时会出现如下错误:
[email protected]:/opt/fastcluster# make
[ 16%] Building CXX object CMakeFiles/fastcluster.dir/kmeans.cpp.o
/opt/fastcluster/kmeans.cpp: 在成员函数‘virtual void fastcluster::kmeans_work_item::serialize(std::ostream&) const’中:
/opt/fastcluster/kmeans.cpp:32:13: 错误: 对不完全的类型‘std::ostream {aka struct std::basic_ostream<char>}’的非法使用
/usr/include/c++/4.6/iosfwd:88:11: 错误: ‘std::ostream {aka struct std::basic_ostream<char>}’的声明
/opt/fastcluster/kmeans.cpp:33:13: 错误: 对不完全的类型‘std::ostream {aka struct std::basic_ostream<char>}’的非法使用
/usr/include/c++/4.6/iosfwd:88:11: 错误: ‘std::ostream {aka struct std::basic_ostream<char>}’的声明
/opt/fastcluster/kmeans.cpp: 在成员函数‘virtual fastcluster::kmeans_work_item* fastcluster::kmeans_work_item::unserialize(std::istream&) const’中:
/opt/fastcluster/kmeans.cpp:40:13: 错误: 对不完全的类型‘std::istream {aka struct std::basic_istream<char>}’的非法使用
/usr/include/c++/4.6/iosfwd:85:11: 错误: ‘std::istream {aka struct std::basic_istream<char>}’的声明
/opt/fastcluster/kmeans.cpp:40:31: 警告: 将一个整数转换为大小不同的指针 [-Wint-to-pointer-cast]
/opt/fastcluster/kmeans.cpp:41:13: 错误: 对不完全的类型‘std::istream {aka struct std::basic_istream<char>}’的非法使用
/usr/include/c++/4.6/iosfwd:85:11: 错误: ‘std::istream {aka struct std::basic_istream<char>}’的声明
/opt/fastcluster/kmeans.cpp:41:31: 警告: 将一个整数转换为大小不同的指针 [-Wint-to-pointer-cast]
make[2]: *** [CMakeFiles/fastcluster.dir/kmeans.cpp.o] 错误 1
make[1]: *** [CMakeFiles/fastcluster.dir/all] 错误 2
make: *** [all] 错误 2
请高手指导一下为什么?