Re: Policy for adding library to system?
On 15 Aug 2001 13:51:49 +0200, Alexander Schinner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I am just looking for a good method to add some libraries to my system.
> Let's assume we have the following situation:
>
>
> The directory /usr/local/foo/include contains a lot of ugly headerfiles and
> /usr/local/foo/lib some (static) libraries. /usr/local, by the way, is a
> NFS-filesystem for the cluster. Now, I want that my users can compile their
> program without adding long -L and -I options when they use gcc.
>
> Now I see the following possibilities:
>
> 1) Copy or link the files to /usr/lib on every machine. Very ugly, isn't it?
> 2) I set LD_LIBRARY_PATH and C_INCLUDE_PATH in /etc/bash.bashrc (or
> something like that).
>
> Isn't there any better way to tell the system that there are some new
> libraries? A global configuration file, which coontains all include and
> library directories?
The ldconfig man page should enlighten you. In brief, your
/etc/ld.so.conf file should get an entry for the /usr/local/foo/lib you
want the system to include in updating the libraries.
--mike
Reply to: