From: Philip L. <ph...@ed...> - 2006-12-01 00:58:29
|
On 25/11/2006, at 11:48 AM, Thomas Engelmeier wrote: > > On 23.11.2006, at 20:20, Philip Lamb wrote: > >> Hi all, >> >> I finally got around to building OpenVRML on Mac OS X on a PowerPC >> machine, and have encountered a build failure during linking. This >> doesn't appear on Mac OS X x86 and I'm at a bit of a loss to diagnose >> the cause: > > I messed around with it some months ago. I don=B4t have the fixed =20 > source at hand, but IIRC fix to link > > te$ c++filt =20 > _ZTv0_n16_ZN46_GLOBAL__N_openvrml_node.cpp_00000000_0CF9259613self_ref=20= > _node16do_event_emitterERKSsENK13dummy_emitter14do_eventout_idEv > > =3D> > > virtual thunk to (anonymous =20 > namespace)::self_ref_node::do_event_emitter(std::basic_string<char, =20= > std::char_traits<char>, std::allocator<char> > =20 > const&)::dummy_emitter::do_eventout_id() const > > was to move the inner, local classes dummy_emitter and =20 > dummy_listener to static local file scope... OK, thanks for the tip. I have just tested it and it appears to be =20 effective. So the current state of my patch file to get OpenVRML 0.16.2 to build =20= for Mac OS X is: =3D=3D=3D=3D=3D=3D BEGIN PATCH FILE =3D=3D=3D=3D=3D=3D=3D diff -urN openvrml-0.16.2/src/libopenvrml/openvrml/node.cpp =20 openvrml-0.16.2.patched/src/libopenvrml/openvrml/node.cpp --- openvrml-0.16.2/src/libopenvrml/openvrml/node.cpp 2006-10-23 =20 19:37:26.000000000 +1300 +++ openvrml-0.16.2.patched/src/libopenvrml/openvrml/node.cpp =20 2006-12-01 12:54:39.000000000 +1300 @@ -1641,6 +1641,31 @@ * @brief <code>mfvec3f</code> <code>exposedfield</code>. */ +class dummy_emitter : public openvrml::sfbool_emitter { +public: + explicit dummy_emitter(const openvrml::sfbool & value): + openvrml::event_emitter(value), + openvrml::sfbool_emitter(value) + {} + +private: + virtual const std::string do_eventout_id() const =20 OPENVRML_NOTHROW + { + return std::string(); + } +}; + +class dummy_listener : public openvrml::sfbool_listener { +public: + virtual ~dummy_listener() OPENVRML_NOTHROW + {} + +private: + virtual void do_process_event(const openvrml::sfbool &, double) + OPENVRML_THROW1(std::bad_alloc) + {} +}; + namespace { class OPENVRML_LOCAL self_ref_node : public openvrml::node { @@ -1686,17 +1711,6 @@ self_ref_node::do_event_listener(const std::string &) OPENVRML_THROW1(openvrml::unsupported_interface) { - class dummy_listener : public openvrml::sfbool_listener { - public: - virtual ~dummy_listener() OPENVRML_NOTHROW - {} - - private: - virtual void do_process_event(const openvrml::sfbool &, =20 double) - OPENVRML_THROW1(std::bad_alloc) - {} - }; - static dummy_listener listener; return listener; } @@ -1705,20 +1719,6 @@ self_ref_node::do_event_emitter(const std::string &) OPENVRML_THROW1(openvrml::unsupported_interface) { - class dummy_emitter : public openvrml::sfbool_emitter { - public: - explicit dummy_emitter(const openvrml::sfbool & value): - openvrml::event_emitter(value), - openvrml::sfbool_emitter(value) - {} - - private: - virtual const std::string do_eventout_id() const =20 OPENVRML_NOTHROW - { - return std::string(); - } - }; - openvrml::sfbool val; static dummy_emitter emitter(val); return emitter; diff -urN openvrml-0.16.2/src/libopenvrml-gl/openvrml/gl/viewer.cpp =20 openvrml-0.16.2.patched/src/libopenvrml-gl/openvrml/gl/viewer.cpp --- openvrml-0.16.2/src/libopenvrml-gl/openvrml/gl/viewer.cpp =20 2006-10-11 13:54:31.000000000 +1300 +++ openvrml-0.16.2.patched/src/libopenvrml-gl/openvrml/gl/=20 viewer.cpp 2006-12-01 11:43:13.000000000 +1300 @@ -1971,7 +1971,7 @@ * As the type of callback functions given to OpenGL, this type =20= must have * C linkage. */ - typedef GLvoid (OPENVRML_GL_CALLBACK_* TessCB)(); + typedef GLvoid (OPENVRML_GL_CALLBACK_* TessCB)(...); /** * @internal @@ -2043,7 +2043,8 @@ reinterpret_cast<TessCB>=20 (tessExtrusionBegin)); gluTessCallback(&tesselator, GLU_TESS_VERTEX_DATA, reinterpret_cast<TessCB>=20 (tessExtrusionVertex)); - gluTessCallback(&tesselator, GLU_TESS_END, glEnd); + gluTessCallback(&tesselator, GLU_TESS_END, + =20 reinterpret_cast<GLvoid (*)(...)>(glEnd)); if (mask & viewer::mask_bottom) { TessExtrusion bottom(&c[0][0], =3D=3D=3D=3D=3D=3D END PATCH FILE =3D=3D=3D=3D=3D=3D=3D Many thanks, Phil. |