🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #925

Problem with generic classes in libg++

#925
From: Jose Exposto
Date: Tue, 12 Mar 1996 00:23
48 lines
1930 bytes
Hello,

When I try to define 2 generic Splay Sets of diferent types from libg++ 
I get a weird link error:

	Doc.Splay.Set (.data+0x0): multiple definition of '_dummy_null'
	String.Splay.Set (.data+0x0): first defined here

Classes Doc and String are the two types for which I want to make a Set.
String is the class String from libg++ and Doc is a class I'm define:

	class Doc: public StringSplaySet{
		....
	}

I build the generic code using:

	genclass String val defs
	genclass String val Set
	genclass String val SplaySet
	genclass String val SplayNode (this one I wasn't expecting, but 
I had to build it as well).

Now I have class StringSplaySet working good.
When I declare a class Cluster:

	class Cluster: public DocSplaySet{
		....
	}

where DocSplaySet if build using:

	genclass Doc val defs
	genclass Doc val Set
	genclass Doc val SplaySet
	genclass Doc val SplayNode.

When I put it all together the link error above shows up. I apreciate 
any feedback on the problem.
Thanks

-- 
+---------------------------------------------------------------------+
| Jose Luis Padrao Exposto                                            |
|     Department of Informatics, University of Minho                  | 
| <mailto:mesexp@di.uminho.pt> <URL:http://alfa.di.uminho.pt/~mesexp> |
| voice : +351-53-616969       fax : +351-53-616969                   |
+---------------------------------------------------------------------+
Technical Details
Message-ID: <3144C3FF.7462@di.uminho.pt>
Path: arc1-ca.pugleaf.net!news.uminho.pt!newsadm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.uminho.pt!newsadm
From: Jose Exposto <mesexp@di.uminho.pt>
Newsgroups: gnu.g++.help,comp.lang.c++
Subject: Problem with generic classes in libg++
Date: Tue, 12 Mar 1996 01:23:27 +0100
Organization: Universidade do Minho
Message-ID: <3144C3FF.7462@di.uminho.pt>
NNTP-Posting-Host: orpheu.ci.uminho.pt
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0 (Win95; I)