解决mmseg.3.0b3的编译问题

在debian 5下编译mmseg.3.0b3, 碰到了:

g++ -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -I.. -I.. -I../src/css -I../src/utils -D_REENTRANT -D_LARGEFILE64_SOURCE -g -O2 -MT UnigramCorpusReader.lo -MD -MP -MF .deps/UnigramCorpusReader.Tpo -c css/UnigramCorpusReader.cpp -fPIC -DPIC -o .libs/UnigramCorpusReader.o
css/UnigramCorpusReader.cpp: In member function 'virtual int css::UnigramCorpusReader::open(const char*, const char*)':
css/UnigramCorpusReader.cpp:89: error: 'strncmp' was not declared in this scope
make[2]: *** [UnigramCorpusReader.lo] Error 1
make[2]: Leaving directory `/home/chandle/mmseg.3.0b3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/chandle/mmseg.3.0b3'
make: *** [all] Error 2

 

 

要不就改UnigramCorpusReader.cpp的这行代码。

 

要不就降低g++版本。

 

aptitude remove g++

 

aptitude install g++-4.2

 

cp /usr/bin/g++-4.2 /usr/bin/g++

 

....

 

你可能感兴趣的:(解决mmseg.3.0b3的编译问题)