OpenMP Mac OSX Lion c++ linker error Undefined symbols for architecture x86_64: "_omp_get_thread_num"

I cannot find this question anywhere on the internet. So my linker error is: Undefined symbols for architecture x86_64: "_omp_get_thread_num()" This is my code: int nthreads; int tid; #pragma omp