Answer the question
In order to leave comments, you need to log in
What is the linker complaining about?
I'm trying to build a program in C (without pluses) using the GMP library:
gcc -g -L/usr/lib/x86_64-linux-gnu/ -llibgmp main.c
/usr/bin/ld: cannot find -llibgmp
$ readlink /usr/lib/x86_64-linux-gnu/libgmp.so
libgmp.so.10.3.0
$ ldconfig -p | grep libgmp
libgmpxx.so.4 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmpxx.so.4
libgmpxx.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmpxx.so
libgmp.so.10 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmp.so.10
libgmp.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmp.so
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Answer the question
In order to leave comments, you need to log in
In general, apparently something was crooked in Ubuntu. The problem is solved by downloading the original library from gmplib.org.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question