Add new comment

Getting OpenMP to compile on OS X

I've had issues getting OpenMP going on the Mac, both on a 10.6 / XCode3 system and on a 10.7 / XCode 4 system. The configure script says it's not available, but it is. FWIW, I can work around this by changing the configure script's sample OpenMP code (line 15359) to:

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#include "omp.h"
main ()
omp_set_num_threads (2);
int count;
#pragma omp parallel for
for (count = 0; count < 2; count++)
return 0;

It's a cleaner test of OpenMP. At this point, you can "./configure --disable-shared" and get a static library for libraw at least. I've yet to debug the dynamic one.