[osg-users] Please test SVN version of OpenSceneGraph

Robert Osfield robert.osfield at gmail.com
Thu Sep 27 02:02:15 PDT 2007


Hi Brian,

The errors don't make any sense to me, the line is:


inline float log2(float v) { return logf(v) * static_cast<float>(INVLN_2); }

And the error you get is:

/usr/src/OpenSceneGraph/include/osg/Math:197: error: expected `)'
before '/' token
/usr/src/OpenSceneGraph/include/osg/Math:197: error: expected `,' or
`;' before '/' token

It's like the compiler is treating the definition of INVLN_2 as a
macro not a const double.  The definition of INVLN_2 is near the top
of include/osg/Math :

const double LN_2 = 0.69314718055994530942;
const double INVLN_2 = 1.0 / LN_2;

This really looks like a bug in the compiler.  Perhaps changing the
above be a hardwired value i.e. const double INVLN_2 = 1.442...  might
get around this bug, could you try this?

Robert.

On 9/27/07, Brian Keener <brianklistacct at alltel.net> wrote:
> Robert,
>
> I noticed over in the Cygwin group they made a few thread changes so I
> recompiled cygwin1.dll and then was going to try the latest svn for OSG since
> you have made a lot of thread changes but I ran into this right off the bat:
>
> [  1%] Building CXX object src/osg/CMakeFiles/osg.dir/AnimationPath.o
> In file included from /usr/src/OpenSceneGraph/include/osg/Vec2f:17,
>                  from /usr/src/OpenSceneGraph/include/osg/Vec2d:17,
>                  from /usr/src/OpenSceneGraph/include/osg/Vec3d:17,
>                  from /usr/src/OpenSceneGraph/include/osg/Matrixf:18,
>                  from /usr/src/OpenSceneGraph/include/osg/AnimationPath:21,
>                  from /usr/src/OpenSceneGraph/src/osg/AnimationPath.cpp:13:
> /usr/src/OpenSceneGraph/include/osg/Math:197: error: expected `)' before '/'
> tok
> en
> /usr/src/OpenSceneGraph/include/osg/Math:197: error: expected `,' or `;'
> before
> '/' token
> /usr/src/OpenSceneGraph/include/osg/Math:198: error: expected `)' before '/'
> tok
> en
> /usr/src/OpenSceneGraph/include/osg/Math:198: error: expected `,' or `;'
> before
> '/' token
> /usr/src/OpenSceneGraph/include/osg/Math:199: error: expected `)' before '/'
> tok
> en
> /usr/src/OpenSceneGraph/include/osg/Math:199: error: expected `,' or `;'
> before
> '/' token
> /usr/src/OpenSceneGraph/include/osg/Math:200: error: expected `)' before '/'
> tok
> en
> /usr/src/OpenSceneGraph/include/osg/Math:200: error: expected `,' or `;'
> before
> '/' token
> make[2]: *** [src/osg/CMakeFiles/osg.dir/AnimationPath.o] Error 1
> make[1]: *** [src/osg/CMakeFiles/osg.dir/all] Error 2
> make: *** [all] Error 2
>
> BrianK at atl-lt-5783 /usr/develop/obj/osg
> $
>
> bk
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list