我正在尝试编译ParsCit附带的CRF++ v0.51。configure没有显示任何丢失的内容,但是,当我尝试make时,我得到了这个错误:
make all-am
make[1]: Entering directory `/path/to/parscit/crfpp/CRF++-0.51'
/bin/bash ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -O3 -Wall -Wno-deprecated -c -o node.lo node.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -O3 -Wall -Wno-deprecated -c node.cpp -fPIC -DPIC -o .libs/node.o
In file included from node.h:13:0,
from node.cpp:9:
path.h:26:52: error: 'size_t' has not been declared
make[1]: *** [node.lo] Error 1
make[1]: Leaving directory `/path/to/parscit/crfpp/CRF++-0.51'
make: *** [all] Error 2我能够编译较新版本的CRF++ v0.58,但ParsCit似乎需要v0.51。
发布于 2015-07-14 18:55:18
根据周围的答案,我首先在导入列表的末尾向node.cpp和path.cpp 添加了导入"stdlib.h“和导入< iostream>行。但它并没有起作用。然后(幸运的是)考虑在这两个文件的导入列表的开头添加导入行。太棒了!,成功了。注意:我不确定stdlib或iostream是否起作用,但哪一个起作用很容易弄清楚。
发布于 2013-09-10 16:00:14
您应该尝试在'node.cpp‘文件中添加#include<iosteream>,然后按照troubleshooting页面中的说明重新编译crf++。希望这能有所帮助。
发布于 2015-03-09 12:30:34
将头文件stdlib.h包含在path.h文件中。
这对我很管用。
https://stackoverflow.com/questions/17752469
复制相似问题