How can I "register" my library
foo.c
, compiled tolibfoo.so
, to link it with-lfoo
? Is it by appending its path toLD_LIBRARY_PATH
? Is it by runningsudo ldconfig
?For curiosity, who do I "register" it with? That is, which application "needs to know" what
-lfoo
means in order forgcc bar.c -lfoo
to work? Is it the bash environment? Is it gcc? Is it the kernel?Is any of this different for static libraries (eg.
libfoo.a
)?
↧
How can I "register" my library libfoo.so to link it with `-lfoo`?
↧