ubuntu - Is lib{library name}.a / .so a naming convention for static libraries in Linux? -


i've had minor programming on ubuntu system (at extremely low-level beginner) , i'm getting familiar makefiles.

i noticed arguments tell linker libraries include -l{library name} corresponding library called "lib{library name}.a" in /usr/lib folder.

i wondering: convention? have thought need type -llibname find library called libname.a, seems assume lib prefix.

is case? can name library without using lib prefix?

you can name 1 way want, ld's -l assuming lib prefix applies both static , shared libraries , goes long way; you'd need name explicitly use 1 without lib prefix.

this useful on modern systems: name libfoo.so can identified link-time library, while foo.so indicates shared object implementing runtime plugin. or subsystem-specific prefixes in place of lib identify plugins particular subsystems; see example pam_*.so , nss_*.so.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -