How to add a path to LDFLAGS

Giuseppe picture Giuseppe · Jun 6, 2011 · Viewed 44.2k times · Source

I'm trying to set up a library called PBC (Pairing-based cryptography). And this library requires another library called GMP -(GNU Multiple-Precision Library).

My problem is after installing GMP correctly, PBC gives an error of:

gmp library not found add its path to LDFLAGS

I have no idea what LDFLAGS is and how to add it to the path.

PS: I'm using MinGW.

Answer

spkane picture spkane · Oct 4, 2012

The question is not really descriptive enough for anyone to answer well, but....

On a Unix-based system you would likely do something like this:

$ export LDFLAGS="-R/the/path/to/the/gmp/lib -L/the/path/to/the/gmp/lib"
$ ./configure
$ make
$ make install

Windows environments with GNU make tools, will need minor tweaks.