Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I'm sure this is pretty basic, but I'm having a hard time tracking this
info down.

Let's say I have both a shared and a static version of the same library
- libalib.a and  If they both reside in the same directory,
which one will get linked?

Say for the sake of argument that shared libraries are linked first.
Then if several directories are being searched (-L<dir1> -L<dir2>) will
the library search order be:

(a) dir1/shared dir2/shared dir1/static dir2/static
(b) dir1/shared dir1/static dir2/shared dir2/static

The article on using shared libaries at

seems to indicate that dlfcn.h/-ldl is used to incorportate shared
library functions into a program.  Does this imply that my previous two
questions are nonsensical?  I.E. - a program is written to either use
shared or static libraries, but not both?

Ron Peterson                   -o)
87 Taylor Street               /\\
Granby, MA  01033             _\_v   ---- 

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /