Error while compiling for Debian amd64 with gcc 4.0

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
moi1392
Peon
Peon
Posts: 10
Joined: Fri Jul 15, 2005 3:36 pm

Error while compiling for Debian amd64 with gcc 4.0

Post by moi1392 » Fri Jul 15, 2005 3:50 pm

I got an error because in guichan, the class ModelList declare a pure virtual and is not implemented.
The linker fail in gui/byu.o when is looking for the super class destructor (ListModel)

I simply add these line at the end of this file (buy.cpp) :

Code: Select all

namespace gcn
{
	ListModel::~ListModel()
	{
	}
}
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: Thu Dec 09, 2004 7:50 pm
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn » Fri Jul 15, 2005 5:25 pm

OK, thanks for this workaround. We'll make sure to include that as long as Guichan 0.5.0 isn't out yet.

One thing though, will it work with Guichan CVS that does define the ListModel destructor?
moi1392
Peon
Peon
Posts: 10
Joined: Fri Jul 15, 2005 3:36 pm

Post by moi1392 » Fri Jul 15, 2005 5:39 pm

sorry for not saying this before : I use guichan CVS (I check it out yesterday)
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: Thu Dec 09, 2004 7:50 pm
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn » Sun Jul 17, 2005 3:27 pm

If it's a problem with Guichan CVS, then Guichan CVS should be fixed and I won't add the workaround to TMW. I've told a Guichan developer about this problem. Latest TMW version and TMW CVS should work fine with Guichan 0.4.0.
User avatar
nym
Novice
Novice
Posts: 116
Joined: Wed Aug 18, 2004 11:01 am
Contact:

Post by nym » Tue Jul 19, 2005 2:13 am

This problem was fixed not long after the 0.4 release and is available in Guichan CVS. If you are using Guichan CVS and are missing the virtual destructor from ListModel, something is wrong and you should re-checkout the Guichan CVS repositry. If you want to use Guichan 0.4 there is a simple patch you can apply to make it usable with gcc4:

http://satgnu.org/nym/guichan/guichan-0.4.0.patch

just use: patch -p0 < guichan-0.4.0.patch
YOU ARE READING THIS!
moi1392
Peon
Peon
Posts: 10
Joined: Fri Jul 15, 2005 3:36 pm

Post by moi1392 » Wed Jul 20, 2005 5:06 pm

yeah, I know the bug fixed by your patch, that's was the way I switch to cvs !!
But event if the desctructor is declared, It must be implemented if some class inherit from that one because it needed !
moi1392
Peon
Peon
Posts: 10
Joined: Fri Jul 15, 2005 3:36 pm

Post by moi1392 » Tue Aug 02, 2005 1:05 pm

bug fixed in guichan CVS :)
Post Reply