buliding c++ static library, shared library and executable