-lpthread --> -pthread.