Re: [Flightgear-devel] simgear cvs compile errors with gcc 3.3.6
On Saturday 17 June 2006 01:11, Joacim Persson wrote: On Sat, 17 Jun 2006, Mathias Fröhlich wrote: Given the error message, I could imagine a that the attached patch helps. Can you please tell me if that patch helps? Compiled without a warning on mat.cxx now. (Was that all? Couldn't handle that method as inline?) I believe I know what the problem is: At the time of implementation there must be more available then just the forward decl of that SGGlyphMaterial. Sad that the others tolerate that code ... I will check that in now, thanks for the feedback ... Greetings Mathias -- Mathias Fröhlich, email: [EMAIL PROTECTED] ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] simgear cvs compile errors with gcc 3.3.6
From talking to others on IRC I understand the cvs version of simgear builds fine with gcc 4, but with gcc 3.3.6 I get these compile errors added below. Is there a simple workaround for this? In file included from mat.cxx:44: ../../../simgear/structure/SGSharedPtr.hxx: In member function `void SGSharedPtrT::get(const T*) const [with T = SGMaterialGlyph]': ../../../simgear/structure/SGSharedPtr.hxx:51: instantiated from `SGSharedPtrT::SGSharedPtr(T*) [with T = SGMaterialGlyph]' mat.hxx:212: instantiated from here ../../../simgear/structure/SGSharedPtr.hxx:91: error: no matching function for call to `SGReferenced::get(const SGMaterialGlyph*)' ../../../simgear/structure/SGReferenced.hxx:41: error: candidates are: static unsigned int SGReferenced::get(const SGReferenced*) ../../../simgear/structure/SGSharedPtr.hxx: In member function `void SGSharedPtrT::put() [with T = SGMaterialGlyph]': ../../../simgear/structure/SGSharedPtr.hxx:58: instantiated from `SGSharedPtrT::~SGSharedPtr() [with T = SGMaterialGlyph]' mat.hxx:212: instantiated from here ../../../simgear/structure/SGSharedPtr.hxx:93: error: no matching function for call to `SGReferenced::put(SGMaterialGlyph*)' ../../../simgear/structure/SGReferenced.hxx:43: error: candidates are: static unsigned int SGReferenced::put(const SGReferenced*) ../../../simgear/structure/SGSharedPtr.hxx:93: warning: possible problem detected in invocation of delete operator: ../../../simgear/structure/SGSharedPtr.hxx:93: warning: invalid use of undefined type `struct SGMaterialGlyph' mat.hxx:55: warning: forward declaration of `struct SGMaterialGlyph' ../../../simgear/structure/SGSharedPtr.hxx:93: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined. make[4]: *** [mat.o] Error 1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] simgear cvs compile errors with gcc 3.3.6
Hi, On Friday 16 June 2006 14:30, Joacim Persson wrote: From talking to others on IRC I understand the cvs version of simgear builds fine with gcc 4, but with gcc 3.3.6 I get these compile errors added below. Is there a simple workaround for this? Given the error message, I could imagine a that the attached patch helps. Can you please tell me if that patch helps? ... I tested with gcc-4.1.1 and gcc-3.2.3 which are both happy with the actual code. Can you help me testing with gcc-3.3.6? :-/ Greetings Mathias -- Mathias Fröhlich, email: [EMAIL PROTECTED] Index: simgear/scene/material/mat.cxx === RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/scene/material/mat.cxx,v retrieving revision 1.29 diff -u -r1.29 mat.cxx --- simgear/scene/material/mat.cxx 11 Jun 2006 13:30:59 - 1.29 +++ simgear/scene/material/mat.cxx 16 Jun 2006 22:38:18 - @@ -317,6 +317,15 @@ } } +SGMaterialGlyph* SGMaterial::get_glyph (const string name) const +{ + mapstring, SGSharedPtrSGMaterialGlyph ::const_iterator it; + it = glyphs.find(name); + if (it == glyphs.end()) +return 0; + + return it-second; +} Index: simgear/scene/material/mat.hxx === RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/scene/material/mat.hxx,v retrieving revision 1.23 diff -u -r1.23 mat.hxx --- simgear/scene/material/mat.hxx 11 Jun 2006 13:30:59 - 1.23 +++ simgear/scene/material/mat.hxx 16 Jun 2006 22:38:18 - @@ -207,10 +207,7 @@ /** * Return pointer to glyph class, or 0 if it doesn't exist. */ - SGMaterialGlyph * get_glyph (const string name) const { -mapstring, SGSharedPtrSGMaterialGlyph ::const_iterator it = glyphs.find(name); -return it != glyphs.end() ? it-second : 0; - } + SGMaterialGlyph * get_glyph (const string name) const; protected: ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] simgear cvs compile errors with gcc 3.3.6
On Sat, 17 Jun 2006, Mathias Fröhlich wrote: Given the error message, I could imagine a that the attached patch helps. Can you please tell me if that patch helps? Compiled without a warning on mat.cxx now. (Was that all? Couldn't handle that method as inline?) ... I tested with gcc-4.1.1 and gcc-3.2.3 which are both happy with the actual code. Can you help me testing with gcc-3.3.6? :-/ Too lazy to upgrade gcc, so I guess that's unavoidable. ;) (3.3.6 is the gcc version on slackware 10.2)___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] simgear cvs compile errors with gcc 3.3.6
On Sat, 17 Jun 2006 01:11:27 +0200 (CEST), Joacim wrote in message [EMAIL PROTECTED]: On Sat, 17 Jun 2006, Mathias Fr�hlich wrote: Given the error message, I could imagine a that the attached patch helps. Can you please tell me if that patch helps? Compiled without a warning on mat.cxx now. (Was that all? Couldn't handle that method as inline?) ... I tested with gcc-4.1.1 and gcc-3.2.3 which are both happy with the actual code. Can you help me testing with gcc-3.3.6? :-/ Too lazy to upgrade gcc, so I guess that's unavoidable. ;) (3.3.6 is the gcc version on slackware 10.2) ..believe me, upgrading gcc et al is the easy way for lazy bums like you and me. Thanks to Frederic, Erik, Curtis, Martin, Anders, Olaf and above all Ralf for helping me get TerrorGear built. -- ..med vennlig hilsen = with Kind Regards from Arnt... ;o) ...with a number of polar bear hunters in his ancestry... Scenarios always come in sets of three: best case, worst case, and just in case. ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel