link to -ldl and -lpthread