compiling and using shared libraries