Building and using shared library of libar instead of static one