Generate dynamic library