I tried to run the following very simple program. It works fine if I compile directly using g++, but C::B fails to compile. The errors are like:
undefined reference to 'GOMP_parallel_start'
undefined reference to 'GOMP_parallel_emd'
....
Any thoughts?
-------------------
#include <omp.h>
#include <stdio.h>
int main (int argc, char *argv[]) {
int id, nthreads;
#pragma omp parallel private (id)
{
id = omp_get_thread_num ();
printf (“Hello World from thread %d\n”, id);
#pragma omp barrier
if (id == 0) {
nthreads = omp_get_num_threads ();
printf (“There are %d threads\n”, nthreads);
}
}
return 0;
}