Compiling error, "cannot find -lgmp"

Bruno Couto bccp79 at
Fri Sep 30 18:57:26 CEST 2005

GMP users, please help!

I have installed GMP on /usr/local/gmp-4.1.4 (with "./configure" and then 
"make") as it was said to be de default location.  The installing procedures 
seemed to be ok.

So, I've wrote the following test.c file:

#include <stdio.h>
#include <gmp.h>

int main (){
mpz_t i;



At first, I tried to compile with
gcc -o test test.c -lgmp
but I got a  "gmp.h File not found"

Then, I tried
gcc -o test test.c -I /usr/local/gmp-4.1.4 -lgmp
gcc -o test test.c -I /usr/local/gmp-4.1.4 -L /usr/local/gmp-4.1.4 -lgmp
but for both I got a "cannot find -lgmp"

As you can probably see, I'm not a C expert, so I would like to apologize if 
I am doing something obviously wrong.

Thanks in advance,


Chegou o que faltava: MSN Acesso Grátis. Instale Já!

More information about the gmp-bugs mailing list