compiling and linking libraries