Error compiling CRF++ v0.51

769 views Asked by At

I'm trying to compile CRF++ v0.51 which comes with ParsCit. configure does not show anything missing, however, when I try to make I get this error:

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

I was able to compile the newer version CRF++ v0.58 but ParsCit seems to need that v0.51.

3

There are 3 answers

0
KNU On

You should try adding #include<iosteream> in the 'node.cpp' file and compile crf++ again, as instructed in troubleshooting page. Hope that helps.

0
N Ramrakhiyani On

Based on the answers all around, I first added the import "stdlib.h" and import < iostream> lines to both node.cpp and path.cpp at the end of the import list. But it didn't work. Then (with some slight luck) thought to add the import lines at the start of the import list in both these files. And BRAVO!!!, it worked. CAUTION: I am not sure whether stdlib or iostream worked, but which one worked can be figured out easily.

0
hemanth reddy On

Include the header file stdlib.h in path.h file.

It worked for me.