Menu

#153 mutiple definition of isnan when OSG code is enabled

async13
open
dilawars
build (6)
5
2015-01-27
2015-01-07
dilawars
No

OSG headers also comes with definitions of isnan and it is in conflict with standard isnan call. Call to isval and other such functions would also be affected.

from /build/buildd/moose-3.0.1/moose_3.0.1/python/moogli/scenegraph.cpp:3:
/usr/include/osg/Math: In function 'bool osg::isNaN(double)':
/usr/include/osg/Math:216:53: error: call of overloaded 'isnan(double&)' is ambiguous
/usr/include/osg/Math:216:53: note: candidates are:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:236:1: note: int isnan(double)
/usr/include/c++/4.6/cmath:552:3: note: bool std::isnan(long double)
/usr/include/c++/4.6/cmath:548:3: note: bool std::isnan(double)
/usr/include/c++/4.6/cmath:544:3: note: bool std::isnan(float)
make[6]: *** [CMakeFiles/_moogli.dir/scenegraph.cpp.o] Error 1

Discussion

  • dilawars

    dilawars - 2015-01-07

    Its happens with gcc-4.6 (on ubuntu-12.04) and various RPM based distributions.

     
  • Anonymous

    Anonymous - 2015-01-27

    Hi,
    Saw this just now. Hopefully you have removed scenegraph.cpp from compilation. It is a test script which I wrote some time back. I think its just because I imported entire namespace, and same function exists both in osg:: and std:: namespace. thanks for letting me know.

     

Anonymous
Anonymous

Add attachments
Cancel