[osg-submissions] VPB float/double bounding box

Robert Osfield robert.osfield at gmail.com
Tue Jul 8 01:11:21 PDT 2008


Hi Christophe,

VPB build system should be able to detect the build type of the OSG
automatically.  Which version of OSG and VPB are you using?

Robert.

On Tue, Jul 8, 2008 at 7:47 AM, christophe loustaunau
<christophe.loustaunau at gmail.com> wrote:
> Hi,
>
> I have compile OSG with OSG_USE_FLOAT_BOUNDINGBOX and
> OSG_USE_FLOAT_BOUNDINGSPHERE to OFF. Then, when I try to
> compile VPB, it hangs on :
>
> 3>DataSet.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float & __thiscall
> osg::BoundingBox::yMax(void)" (__imp_?yMax at BoundingBox@osg@@QAEAAMXZ)
> referenced in function "public: bool __thiscall vpb::DataSet::addModel(enum
> vpb::Source::Type,class osg::Node *)"
> (?addModel at DataSet@vpb@@QAE_NW4Type at Source@2 at PAVNode@osg@@@Z)
> 3>DataSet.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float & __thiscall
> osg::BoundingBox::yMin(void)" (__imp_?yMin at BoundingBox@osg@@QAEAAMXZ)
> referenced in function "public: bool __thiscall vpb::DataSet::addModel(enum
> vpb::Source::Type,class osg::Node *)"
> (?addModel at DataSet@vpb@@QAE_NW4Type at Source@2 at PAVNode@osg@@@Z)
> 3>DataSet.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float & __thiscall
> osg::BoundingBox::xMax(void)" (__imp_?xMax at BoundingBox@osg@@QAEAAMXZ)
> referenced in function "public: bool __thiscall vpb::DataSet::addModel(enum
> vpb::Source::Type,class osg::Node *)"
> (?addModel at DataSet@vpb@@QAE_NW4Type at Source@2 at PAVNode@osg@@@Z)
> 3>DataSet.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float & __thiscall
> osg::BoundingBox::xMin(void)" (__imp_?xMin at BoundingBox@osg@@QAEAAMXZ)
> referenced in function "public: bool __thiscall vpb::DataSet::addModel(enum
> vpb::Source::Type,class osg::Node *)"
> (?addModel at DataSet@vpb@@QAE_NW4Type at Source@2 at PAVNode@osg@@@Z)
> 3>Destination.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float __thiscall
> osg::BoundingBox::radius(void)const "
> (__imp_?radius at BoundingBox@osg@@QBEMXZ) referenced in function "public:
> class osg::Node * __thiscall vpb::DestinationTile::createHeightField(void)"
> (?createHeightField at DestinationTile@vpb@@QAEPAVNode at osg@@XZ)
> 3>ShapeFilePlacer.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float __thiscall
> osg::BoundingBox::yMax(void)const " (__imp_?yMax at BoundingBox@osg@@QBEMXZ)
> referenced in function "public: virtual void __thiscall
> ShapeFileOverlapingHeightFieldPlacer::apply(class osg::Geode &)"
> (?apply at ShapeFileOverlapingHeightFieldPlacer@@UAEXAAVGeode at osg@@@Z)
> 3>ShapeFilePlacer.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float __thiscall
> osg::BoundingBox::xMax(void)const " (__imp_?xMax at BoundingBox@osg@@QBEMXZ)
> referenced in function "public: virtual void __thiscall
> ShapeFileOverlapingHeightFieldPlacer::apply(class osg::Geode &)"
> (?apply at ShapeFileOverlapingHeightFieldPlacer@@UAEXAAVGeode at osg@@@Z)
> 3>ShapeFilePlacer.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float __thiscall
> osg::BoundingBox::yMin(void)const " (__imp_?yMin at BoundingBox@osg@@QBEMXZ)
> referenced in function "public: virtual void __thiscall
> ShapeFileOverlapingHeightFieldPlacer::apply(class osg::Geode &)"
> (?apply at ShapeFileOverlapingHeightFieldPlacer@@UAEXAAVGeode at osg@@@Z)
> 3>ShapeFilePlacer.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: float __thiscall
> osg::BoundingBox::xMin(void)const " (__imp_?xMin at BoundingBox@osg@@QBEMXZ)
> referenced in function "public: virtual void __thiscall
> ShapeFileOverlapingHeightFieldPlacer::apply(class osg::Geode &)"
> (?apply at ShapeFileOverlapingHeightFieldPlacer@@UAEXAAVGeode at osg@@@Z)
>
>
> So, I have added the same two options as OSG in Cmake for VPB  :
>
> OPTION(OSG_USE_FLOAT_BOUNDINGSPHERE "Set to ON to build VirtualPlanetBuilder
> with float BoundingSphere instead of double." ON)
> MARK_AS_ADVANCED(OSG_USE_FLOAT_BOUNDINGSPHERE)
> IF(NOT OSG_USE_FLOAT_BOUNDINGSPHERE)
>     ADD_DEFINITIONS(-DOSG_USE_DOUBLE_BOUNDINGSPHERE)
> ENDIF(NOT OSG_USE_FLOAT_BOUNDINGSPHERE)
>
> OPTION(OSG_USE_FLOAT_BOUNDINGBOX "Set to ON to build VirtualPlanetBuilder
> with float BoundingBox instead of double." ON)
> MARK_AS_ADVANCED(OSG_USE_FLOAT_BOUNDINGBOX)
> IF(NOT OSG_USE_FLOAT_BOUNDINGBOX)
>     ADD_DEFINITIONS(-DOSG_USE_DOUBLE_BOUNDINGBOX)
> ENDIF(NOT OSG_USE_FLOAT_BOUNDINGBOX)
>
> With these two options, It build fine. Maybe we could do a better thing,
> like checking if OSG was build with OSG_USE_FLOAT_BOUNDINGBOX or not, and
> set the same thing for VPB. But I don't know enough CMake to do that !
>
>
> Here is the modify CMakeLists.txt for VPB.
>
>
> Regards.
>
> --
> Christophe Loustaunau.
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>


More information about the osg-submissions mailing list