LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Install GMP 5.1.2 in ubuntu 12.10 (https://www.linuxquestions.org/questions/linux-newbie-8/install-gmp-5-1-2-in-ubuntu-12-10-a-4175476971/)

sumegha13 09-13-2013 05:10 AM

Install GMP 5.1.2 in ubuntu 12.10
 
Hello,

I want to install GMP 5.1.2 to run my code.

I have installed it in my user login by comman as below.

Code:

$./configure
$ make
$ make check

but,when i am running my code it is giving me the below error..

Code:

sumegha@sumegha-SVF15212SNW:~/ECDSA$ cd src
sumegha@sumegha-SVF15212SNW:~/ECDSA/src$ gcc -lgmp -o main.c
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status

Any suggetions ???

brianL 09-13-2013 06:21 AM

Isn't it available from a Ubuntu repository? Try:
Code:

sudo apt-get install libgmp-dev
Or something like that.

sumegha13 09-13-2013 06:53 AM

Hello,

I am new to linux so i dont have that much idea about it.Now i am getting following error.

Code:

sumegha@sumegha-SVF15212SNW:~$ cd ECDSA
sumegha@sumegha-SVF15212SNW:~/ECDSA$ cd src
sumegha@sumegha-SVF15212SNW:~/ECDSA/src$ gcc -lgmp -o main.c
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
sumegha@sumegha-SVF15212SNW:~/ECDSA/src$


cascade9 09-13-2013 07:29 AM

Seems to be in the ubuntu repository (repo)-

http://packages.ubuntu.com/quantal/gmp-doc

You are far less likely to have isseus installing or running packages from the repos than if you try a manual install.


All times are GMT -5. The time now is 07:52 PM.