Linker library for OpenMP for Snow Leopard?

Posted by unknownthreat on Stack Overflow See other posts from Stack Overflow or by unknownthreat
Published on 2010-05-24T15:14:25Z Indexed on 2010/05/24 15:31 UTC
Read the original article Hit count: 331

Currently, I am trying out OpenMP on XCode 3.2.2 on Snow Leopard:

#include <omp.h>
#include <iostream>
#include <stdio.h>

int main (int argc, char * const argv[]) {

    #pragma omp parallel
    printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());
    return 0;
}

I didn't include any linking libraries yet, so the linker complains:

"_omp_get_thread_num", referenced from: _main in main.o
"_omp_get_num_threads", referenced from: _main in main.o

OK, fine, no problem, I take a look in the existing framework, looking for keywords such as openmp or omp... here comes the problem, where is the linking library? Or should I say, what is the name of the linking library for openMP? Is it dylib, framework or what? Or do I need to get it from somewhere first?

© Stack Overflow or respective owner

Related posts about xcode

Related posts about macosx