* Steffen DETTMER wrote on Wed, Jan 27, 2010 at 05:38:02PM CET: > * Philip Herron wrote on Wed, Jan 27, 2010 at 16:22 +0000: > > Thanks sorry about that feel a bit stupid now, but i didn't know it > > was as simple as that i though you needed pkg-config setups to get > > correct linking strings. Is it really as simple as > > /usr/local/lib/lib<bla>.so link against it with the -l<bla>. > > Isn't -l<bla> linking /usr/local/lib/lib<bla>.a (.a not .so)?
Most systems which provide shared libraries will by default prefer linking against a shared library over a static one. Most linkers have a command line switch to change this preference to one that requires a static library and fails with a shared one. Whether the whole linker path is first searched for one kind, then the other, or whether the shared/static selection is done per-directory, varies between systems; IIRC. FWIW, there are lots of naming conventions for shared libraries, .so is only one of them (and w32 also has .lib instead of .a). Cheers, Ralf
