c - Variable "undeclared" in "#pragma" command? -


I'm compiling a branch of the 3D modeling program (using) on ​​a Fedora 8 box, and there is an error That I did not face compiling a single source on a CentOS 5 box, and I think it is the error with the definition of the variable:

  source / blender / blenkernel / intern 'Mul_bfmatrix_lfvector' in the / implicit.c: function: source / blender / blenkernel / intern / implicit.c: 592: error: 'CLOTH_OPENMP_LIMIT' undeclared (first use in this function) Source / Blender / Blankelnell / Intern / Insic .: 592: Error: (Each unauthorized identifier is shown only once in the Source / Blender / Blankelnell / Intern / Insact, each function.) Source / Blender / Blankeln / Intern / Implic: Function 'Cloth_collke_forces': source / blender / blenkernel / intern / implicit.c: 1700: error: 'CLOTH_OPENMP_LIMIT' undeclared (the first usage function in this)  

file Implicit.c define that variable Requirement; Here are the first few lines of file:

  #include "MEM_guardedalloc.h" # include "#BKE_cloth.h" # # # "DNA_object_force.h" # include "#BKE_effect.h" # Include "BKE_global.h" #include "BKE_utildefines.h" #include "BLI_threads.h" #define CLOTH_OPENMP_LIMIT25 #ifdef _WIN32 #include & lt; Windows.h & gt; Static LARGE_INTEGER _itstart, _itend; Static LARGE_INTEGER ifreq;  

There are two rows to throw an error:

  #pragma omp parallel section private (i) if (vcount> CLOTH_OPENMP_LIMIT)  

and

  #pragma omp parallel for private (i) if (numverts> CLOTH_OPENMP_LIMIT)  

I'm feeling The error is due to the compiler and how it handles when those variables are defined, and since Fedora 8 is a bit older, then there may be an older version of some compiler in it, which is messing it up to anyone. Show me how I can show as the variable "behind the scenes" is?

that compiler does not support OpenMP This is the first mention of OpenMP and GCC

9 March 2006

... then starting with GCC 4.2. The compiler supports OpenMP v2.5 specification.

Here is the tip that the value is quite clearly defined, even then # Pragya ... line pre-processor can not interpret definition according to error. Once you understand that the code is using a non-standard #Program Compiler, the compiler becomes the main suspect.


Comments