Mac OS 10.11.1 MakeFile错误:未找到ext / numeric文件

时间:2015-11-14 18:25:50

标签: macos makefile

我正在尝试编译一个名为CofiRank的公共软件。以下是包裹的链接:https://github.com/markusweimer/cofirank

要编译它,我运行:

make -f CofiRank-Makefile.mk CONF=Deploy

这是我的终端结果的一部分:

g++ -D NDEBUG   -c -g -Isrc -Ilibs -o build/Deploy/GNU-
MacOSX/src/loss/ndcgdomainmodel.o src/loss/ndcgdomainmodel.cpp
In file included from src/utils/ublastools.cpp:1:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric>         // for iota
In file included from src/bmrm/solver/dualinnersolver.cpp:29:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric>         // for iota
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/utils/ublastools.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/bmrm/solver/dualinnersolver.o] 
In file included from src/bmrm/solver/daifletcherpgm.cpp:28:
In file included from src/bmrm/solver/daifletcherpgm.hpp:22:
In file included from src/bmrm/solver/dualinnersolver.hpp:6:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric>         // for iota
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/loss/ndcgdomainmodel.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

我搜索了很多但无法修复它。我想我需要使用libstd ++而不是lib ++这是mac os的默认值,但我不知道如何(或者是否是问题)

有人可以帮我这个吗?

1 个答案:

答案 0 :(得分:0)

<ext/numeric>是由GCC附带的GNU C ++标准库(libstdc ++)提供的非标准头文件。

您可能正在使用Clang进行编译,因此需要告诉它使用GNU库而不是它自己的库,因此请使用-stdlib=libstdc++进行编译