4

I'm currently trying to install moses script, part of moses the machine translation tool, but keep getting error:

/home/moses/scripts/training/lexical-reordering/reordering_classes.cpp:349: undefined reference to `gzopen'
/home/moses/scripts/training/lexical-reordering/reordering_classes.cpp:353: undefined reference to `gzwrite'
/home/moses/scripts/training/lexical-reordering/reordering_classes.cpp:356: undefined reference to `gzclose'

I'm using gcc 4.6.1 in Ubuntu 11.10, and already installed the zlib1g-dev package. The moses source is the latest (2010-08-13).

What should I do? Do I need to install some additional package?

sth
  • 222,467
  • 53
  • 283
  • 367
ndriks
  • 359
  • 6
  • 16
  • yes, this is the command used to compile and link reordering_classes.cpp: g++ -O6 -g -c reordering_classes.cpp g++ -lz score.cpp reordering_classes.o -o score – ndriks Nov 24 '11 at 15:50

1 Answers1

6

Put -lz after your files:

g++ score.cpp reordering_classes.o -lz -o score
Michael Krelin - hacker
  • 138,757
  • 24
  • 193
  • 173
  • Thank you very much! after changing the order in the Makefile, the compile now works! thx :D – ndriks Nov 24 '11 at 16:04