evvai ho già imparato quel che mi mancava
di dire -lpthread a gcc

$ gcc -o th th.c -lpthread
$ ./th
hello from the thread!