User forums > Using Code::Blocks
GMP (GNU Multi-Precision library)
(1/1)
ixfd64:
I am planning to do some programming with the GMP library. I know that GMP was originally made for Linux, so I downloaded the Windows port.
I compiled the sources on Cygwin and got a file called libgmp.a, which seems to be the library file. Does anyone know where I should place libgmp.a and gmp.h (the header file) for it to work with Code::Blocks?
Thanks in advance.
MortenMacFly:
--- Quote from: ixfd64 on March 11, 2008, 04:11:48 am ---I compiled the sources on Cygwin and got a file called libgmp.a, which seems to be the library file. Does anyone know where I should place libgmp.a and gmp.h (the header file) for it to work with Code::Blocks?
--- End quote ---
Leave them where they are and setup your project accordingly (search directories for the compiler/linker and librar{y/ies} for the linker).
straka.milan:
--- Quote from: ixfd64 on March 11, 2008, 04:11:48 am ---I compiled the sources on Cygwin and got a file called libgmp.a, which seems to be the library file. Does anyone know where I should place libgmp.a and gmp.h (the header file) for it to work with Code::Blocks?
--- End quote ---
Or you can put them in the include and lib directories of the compiler you are using.
I.e. if you use Codeblocks 8.02 with mingw bundled and you installed it to C:\Program files\Codeblocks,
than put libgmp.a to C:\Program files\Codeblocks\Mingw\lib and gmp.h to C:\Program files\Codeblocks\Mingw\include.
This way all projects can use gmp, just #include <gmp.h> at the beginning and add
library gmp in the linker section of the project configuration.
Navigation
[0] Message Index
Go to full version