Re: Massrebuilds for GCC 4.3 coming soon to a buildsystem near you!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jon Ciesla wrote:
On Wed, 13 Feb 2008 07:25:56 -0600 (CST), Jon Ciesla wrote:

I've got all mine patched and done for 4.3 but xmoto, which I've got
partway fixed but am stuck.  Anyone understand this?

http://koji.fedoraproject.org/koji/getfile?taskID=406771&name=build.log
Scene.o: In function `CollisionSystem::CollisionSystem()':
Scene.cpp:(.text._ZN15CollisionSystemC1Ev[CollisionSystem::CollisionSystem()]+0xd1):
undefined reference to `ElementHandler<Entity>::reset()'

This usually means that the definition of
class template ElementHandler's member function reset is not included
in the translation unit, only the declaration.

Find out where it's defined, and make sure that scene.cpp includes
that
file.
It's defined in Collision.h in the parent directory, and it is included
in
Scene.cpp, but I noticed in Scene.h it uses:

#include "Collision.h"

rather than:

#include "../Collision.h"

So I patched that, but it doesn't help.
It's declared in Collision.h but defined only in Collision.cpp, which
doesn't work as it is a template. The author had tried to also move the
ctor into the .cpp file and mentions in a comment that it didn't compile.
Moving the definition of ElementHandler<T>::reset() method into the
Collision.h file would fix this (but it's likely not the only definition
that needs to be moved).

That makes sense.  As my c++ are not quite up to this, I've sent this
upstream.  Thanks all!



Attached is a patch which fixes this by un-inlining the Collision constructor. Actually it seems that the best way to fix this is to un-inline all Collision members which use the template and move the template entirely to Collision.cpp

Regards,

Hans
--- xmoto-0.4.0/src/Collision.cpp	2008-01-18 22:48:25.000000000 +0100
+++ xmoto-0.4.0.new/src/Collision.cpp	2008-02-13 16:17:03.000000000 +0100
@@ -51,6 +51,12 @@
                                     } \
                                     (v).clear()
 
+
+  CollisionSystem::CollisionSystem()
+  {
+    m_pGrid = NULL; m_bDebugFlag=false;
+  }
+
   /*===========================================================================
   Reset collision system
   ===========================================================================*/
--- xmoto-0.4.0/src/Collision.h	2007-12-25 18:15:39.000000000 +0100
+++ xmoto-0.4.0.new/src/Collision.h	2008-02-13 16:01:10.000000000 +0100
@@ -147,7 +147,7 @@
   ===========================================================================*/
   class CollisionSystem {
   public:
-    CollisionSystem() {m_pGrid = NULL; m_bDebugFlag=false;}
+    CollisionSystem();
     ~CollisionSystem() {reset();}
     
     /* Methods */
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux