Add a practice for static lib and fixed a compiler warning