add -lpthread for linux