Problem linking to gmp

Hello!

I'm using a linux machine with kde environment on a university, connected to a network. I have a c++ program using gmp and mpfr; compiling it with g++ I use -lgmp -lgmpxx -lmpfr. This used to work like a charm but now it suddenly can't find any of those anymore (I get the error "cannot find -lgmp").

Since it's on a network it might not be too easy locating the c++ files (I have tried). I also tried installing gmp from scratch from the gmp website, didn't understand anything of that.

Any ideas?
Last edited on
Maybe check that the gmp libraries are in the expected place:
 
ls /usr/lib/libgmp*

If they have been installed elsewhere then you probably need to add the directory they are installed in to the compiler flags
 
g++ ... -L/path/to/gmp/lib -lgmp -lgmpxx ...
Thanks for the reply! But I just figured out that if I change to another environment (xfce?) it works again.
Topic archived. No new replies allowed.