0
编译当我得到以下错误(称为azove 2.0),它依赖于GNU Multi-precision library:对GNU的多精度库C++编译错误
> make
g++ -Wall -O3 -DFIX_NUMBER_OF_SIGMDDNODE_SONS -DUSE_TIMER -I. -c conBDD.cpp -o conBDD.o
In file included from conBDDnode.hpp:27,
from conBDD.hpp:25,
from conBDD.cpp:22:
/usr/include/gmpxx.h: In destructor ‘__gmp_alloc_cstring::~__gmp_alloc_cstring()’:
/usr/include/gmpxx.h:2096: error: ‘strlen’ was not declared in this scope
conBDD.cpp: In member function ‘void conBDD::build()’:
conBDD.cpp:61: error: ‘numeric_limits’ was not declared in this scope
conBDD.cpp:61: error: expected primary-expression before ‘int’
conBDD.cpp:61: error: expected `;' before ‘int’
conBDD.cpp:68: error: expected primary-expression before ‘int’
conBDD.cpp:68: error: expected `;' before ‘int’
make: *** [conBDD.o] Error 1
我曾尝试加入任何与以下两个行
#include <cstdlib>
using std::strlen;
到conBDD.cpp
,但错误仍然存在。
我不能说这是一个错误来自GNU的多精度库还是来自Azove。任何指针将不胜感激。
'std :: strlen'在''中定义。另外,在'using'中只放入一个':'。我觉得GMP有这种错误似乎很奇怪,但你也可以试着'#include '。 –
另外,'numeric_limits'的错误似乎是依靠在Azove的代码中使用'using namespace std;'来完成的。也许这个库中有一个bug? –