fixed shared library linkage error handling