Undefined link to `gzopen 'in moses

I'm currently trying to install the moses script, part of the moses machine translation tool, but keep getting the 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 am using gcc 4.6.1 on Ubuntu 11.10 and have already installed the zlib1g-dev package. The source of moses is the latest (2010-08-13).

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

+4
source share
1 answer

Put -lz after your files:

 g++ score.cpp reordering_classes.o -lz -o score 
+5
source

Source: https://habr.com/ru/post/1382914/


All Articles