code to build both shared and static library, main.c not needed, test segfaults