linking (statically and dynamically) and buliding libs