Reputation: 14012
I never programmed in a computer without access to install libraries as root so I'm not really sure of what should I do to use libraries that I do not install in the usual places.
Usually, when I have admin priviledges I'd do the usual:
./configure
make
make install
to install the library. Then I'd do the common #include <library>
and compile with (actually this is done in my makefile):
gcc -c file1.c
gcc -c file2.c
...
gcc file1.o file2.o ... -o executable -llibrary
How should I deal with a library that was installed in my home folder? Suppose I install it with:
./configure --prefix=$HOME
make
make install
And now I have directories like $HOME/include
, $HOME/lib
and $HOME/share
, etc... how should I include the lib, compile and link the binaries?
Upvotes: 1
Views: 807