FreeBSD,Boost,编译失败

时间:2012-04-21 10:45:41

标签: boost freebsd

我正在尝试在FreeBSD上编译一些代码(不是我的),它使用boost,但是当我运行Makefile时,我收到以下错误:

g++ -Wall -I/usr/local/include/boost `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Codegen.o Codegen.cxx
In file included from SubbandAnalysis.h:11,
                 from Fingerprint.h:12,
                 from Codegen.cxx:13:
MatrixUtility.h:12:42: error: boost/numeric/ublas/matrix.hpp: No such file or directory
MatrixUtility.h:13:48: error: boost/numeric/ublas/matrix_proxy.hpp: No such file or directory
In file included from SubbandAnalysis.h:11,
                 from Fingerprint.h:12,
                 from Codegen.cxx:13:
MatrixUtility.h:15: error: 'boost' has not been declared
MatrixUtility.h:15: error: 'ublas' is not a namespace-name

我安装了boost,文件matrix.hpp等确实在文件夹/usr/local/include/boost/numeric/ublas/中。

我该怎么做才能修复它?

1 个答案:

答案 0 :(得分:4)

-I/usr/local/include/boost应该只是-I/usr/local/include

现在,编译器会搜索/usr/local/include/boost/boost/numeric/ublas/matrix.hpp