I just installed the zkcm library on my kubuntu machine and I'm having trouble compiling c++ code.
I have installed the gmp
and mpfr
libraries and checked that they work; the code
mpfr_t m1, m2, m3;
mpfr_init(m1); mpfr_init(m2); mpfr_init(m3);
mpfr_mul(m1, m2, m3, MPFR_RNDN);
compiles and runs.
I then try to use zkcm
; I try compliling the line
zkcm_matrix m;
and get a bunch of errors seemingly about zkcm
not finding mpfr
; here is the beginning of the output:
/usr/local/lib/libzkcm.a(zkcm_c.o): In function `zkcm_init_ri(zkcm*, double, double)':
/home/jorgen/Downloads/zkcm_lib-0.4.0/srcs/zkcm_c.c:126: undefined reference to `mpfr_inits'
/home/jorgen/Downloads/zkcm_lib-0.4.0/srcs/zkcm_c.c:127: undefined reference to `mpfr_set_d'
/usr/local/lib/libzkcm.a(zkcm_c.o): In function `zkcm_init_ri_str(zkcm*, char const*, char const*)':
/home/jorgen/Downloads/zkcm_lib-0.4.0/srcs/zkcm_c.c:132: undefined reference to `mpfr_inits'
/home/jorgen/Downloads/zkcm_lib-0.4.0/srcs/zkcm_c.c:136: undefined reference to `mpfr_set_str'
/home/jorgen/Downloads/zkcm_lib-0.4.0/srcs/zkcm_c.c:134: undefined reference to `mpfr_set_ui'
I have tried to follow the instructions infrom zkcm
; I have the lines
#include "mpfr.h"
#include "zkcm.hpp"
and I compile the code (called test.cpp
) using
g++ test.cpp -msse2 -std=c++11 -O2 -lm -lmpfr -lgmp -lgmpxx -lzkcm -o test
Any ideas?