added -pthread for linux