pthread compilation error on 10.6.6 receiving a compilation error related to pthread

Hi,
I am very new to GPU computing and I’m trying to compile a demo package of a software toolkit for neural network simulations. This toolkit uses Matlab to interface with the C code.
The error I am receiving is the following:

Undefined symbols:
“_pthread_join$UNIX2003”, referenced from:
_Session::DestroyWorker() in hhpkg_cns_generated_cuda.o
“_pthread_cond_wait$UNIX2003”, referenced from:
_Session::WaitForMaster() in hhpkg_cns_generated_cuda.o
_Session::WaitForMaster() in hhpkg_cns_generated_cuda.o
_Session::WaitForWorker() in hhpkg_cns_generated_cuda.o
_Session::RunWorker() in hhpkg_cns_generated_cuda.o
“_pthread_cond_init$UNIX2003”, referenced from:
_Session::CreateWorker(void* ()(void))in hhpkg_cns_generated_cuda.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

it seems to be a dynamic library error (judging by the last 2 lines), but I can’t understand what exactly is the problem. I know it is a poor description and this is not exactly the right way to ask for help but it’s really hard to isolate the problem since the matlab code and C code is really intermingled. I can provide additional clarification if you can point me in the right direction.
For those who want to reproduce the error, the toolkit is here:
http://cbcl.mit.edu/jmutch/cns/

You’d need matlab to use it of course. I get the error after trying to compile demopkg that is contained within, with the command “cns_build demopkg”
I’m using a Macbook Pro with MacOSX 10.6.6 (specs are below). I also have the latest CUDA driver and toolkit installed

Model Name: MacBook Pro
Model Identifier: MacBookPro6,2
Processor Name: Intel Core i7
Processor Speed: 2.66 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache (per core): 256 KB
L3 Cache: 4 MB
Memory: 8 GB

NVIDIA GeForce GT 330M:
Chipset Model: NVIDIA GeForce GT 330M
Type: GPU
Bus: PCIe
PCIe Lane Width: x16
VRAM (Total): 512 MB
Vendor: NVIDIA (0x10de)

Any ideas are welcome.

The linker is complaining that it kind find the pthread_join symbol which means you haven’t linked against the pthread library. add -lpthread to your compiler arguments to link against pthread.