LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gcc (https://www.linuxquestions.org/questions/linux-newbie-8/gcc-537135/)

wendea 03-13-2007 01:31 PM

gcc
 
Im trying to compile a program through gcc called primes. I have the code for FC6 but im running FC5. The command for FC6 is:

gcc -O primes.cr.c -lgmp -o primes

Whenever I run it I get a error saying:

primes.cr.c:3:16: error: gmp.h: No such file or directory
primes.cr.c: In function ‘main’:
primes.cr.c:7: error: ‘mpz_t’ undeclared (first use in this function)
primes.cr.c:7: error: (Each undeclared identifier is reported only once
primes.cr.c:7: error: for each function it appears in.)
primes.cr.c:7: error: expected ‘;’ before ‘n’
primes.cr.c:9: error: ‘n’ undeclared (first use in this function)
primes.cr.c:10: error: ‘st’ undeclared (first use in this function)
primes.cr.c:11: error: ‘j’ undeclared (first use in this function)
primes.cr.c:12: error: ‘g’ undeclared (first use in this function)
primes.cr.c:13: error: ‘k’ undeclared (first use in this function)

I believe that thats part of the file that gets the error. Although it got downloaded on another computer fine. So the file is not corrupted for the other computer. However the other file is running FC6.

Any suggestions? :)

Thanks :)

osor 03-13-2007 01:54 PM

You need to install gmp

wendea 03-13-2007 04:08 PM

And how do I do that or where do I get that?

Nylex 03-14-2007 01:20 AM

http://gmplib.org/

osor 03-14-2007 12:38 PM

Or you might use fedora’s package manager to install libgmp or whatever they call it.

wendea 03-15-2007 12:17 PM

ok that helped alot, I used that site. thatnylex supplied. I used it and it worked :) thanks for all your help.


All times are GMT -5. The time now is 03:42 PM.