Note that there are some explanatory texts on larger screens.

plurals
  1. POVariable "undeclared" in "#pragma" command?
    primarykey
    data
    text
    <p>I'm compiling a branch of the <a href="http://blender.org" rel="nofollow noreferrer">Blender</a> 3D modeling program <a href="http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Fedora_12/Scons" rel="nofollow noreferrer">from source</a> (using <a href="http://www.scons.org/" rel="nofollow noreferrer">SCONS</a>), on a Fedora 8 box, and am running into an error that I didn't encounter compiling the same source on a CentOS 5 box, and I'm thinking it has to do with the variable definition. The error is:</p> <pre><code>source/blender/blenkernel/intern/implicit.c: In function ‘mul_bfmatrix_lfvector’: source/blender/blenkernel/intern/implicit.c:592: error: ‘CLOTH_OPENMP_LIMIT’ undeclared (first use in this function) source/blender/blenkernel/intern/implicit.c:592: error: (Each undeclared identifier is reported only once source/blender/blenkernel/intern/implicit.c:592: error: for each function it appears in.) source/blender/blenkernel/intern/implicit.c: In function ‘cloth_calc_force’: source/blender/blenkernel/intern/implicit.c:1700: error: ‘CLOTH_OPENMP_LIMIT’ undeclared (first use in this function) </code></pre> <p>The file <code>implicit.c</code> does define that variable; here's the first few lines of the file:</p> <pre><code>#include "MEM_guardedalloc.h" #include "BKE_cloth.h" #include "DNA_object_force.h" #include "BKE_effect.h" #include "BKE_global.h" #include "BKE_utildefines.h" #include "BLI_threads.h" #define CLOTH_OPENMP_LIMIT 25 #ifdef _WIN32 #include &lt;windows.h&gt; static LARGE_INTEGER _itstart, _itend; static LARGE_INTEGER ifreq; </code></pre> <p>the two lines that are throwing an error are: </p> <pre><code>#pragma omp parallel sections private(i) if(vcount &gt; CLOTH_OPENMP_LIMIT) </code></pre> <p>and</p> <pre><code>#pragma omp parallel for private(i) if(numverts &gt; CLOTH_OPENMP_LIMIT) </code></pre> <p>I'm guessing the error is due to the compiler and how it handles when in the compilation that variable gets defined, and since Fedora 8 is a bit outdated, it might have an older version of some compiler that's messing it up. Anyone have an idea how I can get around this variable showing up as "undeclared"?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload