parent: g++ -ldl -lpthread -o main main.cpp client.cpp resource.cpp lock.cpp client: gcc -shared -fPIC -o libclient.so client-module.c