delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/26/20:15:07

Message-Id: <199703270107.UAA01491@hcst.net>
From: "Bryan Murphy" <bf461 AT cleveland DOT freenet DOT edu>
To: <djgpp AT delorie DOT com>
Subject: Hello, question, probably been asked a billion times before.
Date: Wed, 26 Mar 1997 20:05:26 -0500
MIME-Version: 1.0

Hi, I'm brand new to this list, haven't even gotten anything from it yet.  
Anyways, I've been stuck for about three weeks now on this same 
problem and it's really REALLY starting to aggravate me. I've been trying
to get help on the UseNet, but nobody wants to respond!!  Between that,
spring break, and being sick I haven't accomplished any work with my
program in a while.  I want to get back to work on it! :)

Ok, here is the problem:  Templates.  I know all about the current version
of g++ and it's template problems.  I found this out AFTER I wrote my
template library.  Anyways, I have a Linked List Object that uses
templates.
I have an INI file library, which has three classes for storing values from
a file similar to windows INI files.  The classes are:

INIFILE 
-> stores TOPICS using LL 
-> stores KEYS using LL
-> stores char *s using LL.

It works fine.  I got it to work using -fno-implicit-templates and
instantiating
each object in the LLIST.CC file.

I have another file, called UNIVERSE.H/UNIVERSE.CC.  This simply
has an object called UNIVERSE which contains a linked list of objects
called OBJECT (each object in the universe).  This is where I get the
problems.  I instantiated the OBJECT in the LLIST.CC file just as before,
but when I compile I get 'Undefined reference to OBJECT virtual Table'
errors and 'Undefined reference to OBJECT operator =='.  All my
objects have an == operator defined for them.  I've check this over again
and again, and I can't for the life of me see why it works fine in the one
file and not in the other.  One thing to note, the UNIVERSE object does
declare an INIFILE object within it and uses it, but I get no complaints
about the INIFILE object at all.  

And, what does undefined reference to OBJECT virtual table mean
anyways?

PLEASE PLEASE HELP ME!!  Help is MUCH appreciated!! Thanks!

Also, any idea when Templates will finally be implemented into g++ 
properly?  I really tend to rely on them heavily! :(

-------------------------------------------------------------------------
 Bryan Murphy                      Homepage: http://www.hcst.com/~bryan/
 Hassler Communication Systems     Workpage: http://www.hcst.com/
 Dayton, Ohio                      E-mail:   bf461 AT cleveland DOT freenet DOT edu
-------------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019