Thread: Where to install my gmp.h library?

  1. #1
    Registered User
    Join Date
    May 2010

    Where to install my gmp.h library?

    I'm doing some upcoming programming involving some math, and I need the GNU MP library for it. Where do I install it? I think it should probably go into some include folder, but I have a bunch of include folders and am not sure which one to use. And as for installing, I navigate through terminal to gmp-5.0.1 in the correct "include" file and execute "./configure" "make" "make check" and "make install"? Thanks!

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    If you're on Linux, you should be able to install gmp through your package manager. On Debian, for example, I believe the package would be libgmp3-dev.

    If you're building from source and you trust the Makefile, then the step of "make install" (run as root) should copy the include files and libraries to the default locations. Alternatively, you could neglect to install the library onto your system and just link to it directly when you use it. For example, if you installed it in ~/libs/gmp, you should be able to add "-I ~/libs/gmp/include -L ~/libs/gmp/lib" or something along those lines to your gcc command line and it will find the libraries.

    If you're on Windows you might try something like this: GMP Install Instruction for Windows Platform

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ:

    My website:
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling GNU MP
    By mattnp12 in forum C Programming
    Replies: 3
    Last Post: 06-23-2011, 03:58 PM
  2. Replies: 2
    Last Post: 08-05-2010, 09:06 AM
  3. Replies: 1
    Last Post: 08-16-2009, 05:49 AM
  4. Stuio 2008 Changes to runtime library
    By Mario F. in forum C++ Programming
    Replies: 1
    Last Post: 08-03-2009, 07:33 AM
  5. very weird .h problem
    By royuco77 in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 07:55 AM

Tags for this Thread