I am writing a program that uses threads. Everything compiles fine, but when I run the program, I get the following error:
Shared object "libpthread.so.20" not found

Here's what I have in my makefile:
Code:
files = thread thread.core temp output
includes = -I/usr/pkg/include
lib = -L/usr/pkg/lib
library = -lpthread

make:
	gcc thread.c $(lib) $(includes) $(library) -o thread
	./thread -p 23 -c 3 -n 10 -t 5 -s 6

clean:
	@for file in $(files); do \
		if [ -f $$file ] ; then\
			echo "rm $$file"; \
			rm $$file; \
		fi; \
	done;
I am doing my work on NetBSD 1.6.1. Can someone help me out?