add -lpthread when in linux