Add Makefile. Need to use -lpthread otherwise it will get segfault..