Thread: How To Install A New C Library on Linux

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    33

    How To Install A New C Library on Linux

    First of all sorry for the newbie question, but here we go:

    I am trying to install the GMP (GNU Multiple Precision Arithmetic) Library on my Ubuntu machine.

    I downloaded the .tar.bz2 file, and extracted it. Now I have a folder called gmp-4.3.2 with all the files of the library.

    What should I do now to install the library? I know how to use it once it's installed (e.g., #include <gmp.h>).

    I tried to read the documentation on the GMP site, but the it only says to use "make install". I am not sure where I should move the folder first, and when to use "make install".

    Thanks

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Quote Originally Posted by envec83
    I tried to read the documentation on the GMP site, but the it only says to use "make install".
    Do, or do not. There is no try.

    Basically, you didn't read the documentation. It says very clearly*:
    GMP has an autoconf/automake/libtool based configuration system. On a Unix-like system a basic build can be done with

    Code:
         ./configure
         make
    Some self-tests can be run with

    Code:
         make check
    And you can install (under /usr/local by default) with

    Code:
         make install
    * Well, not so clearly if you have no clue that this should be done at a command prompt in the source directory, but you didn't ask about that so it seems that you do have the necessary background knowledge.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    33
    I did read the documentation as stated in my first post, but I couldn't figure out how to apply that.

    I managed to install the library using the Synaptics manager.

    Thanks anyway.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Where to install my gmp.h library?
    By mattnp12 in forum C Programming
    Replies: 1
    Last Post: 05-29-2010, 07:58 PM
  2. Replies: 4
    Last Post: 05-01-2009, 02:12 AM
  3. Install library
    By Eavan Hyde in forum C++ Programming
    Replies: 1
    Last Post: 02-25-2004, 10:08 PM
  4. Linux install
    By moi in forum Tech Board
    Replies: 0
    Last Post: 12-08-2002, 10:35 AM
  5. trying to install linux
    By task in forum Linux Programming
    Replies: 19
    Last Post: 10-28-2002, 09:42 AM

Tags for this Thread