compile to lib