delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/08/22:14:43

From: bryan AT alpha DOT hcst DOT com (Bryan Murphy)
Newsgroups: comp.os.msdos.djgpp
Subject: I don't Understand this Error
Date: 8 Mar 1997 21:05:07 -0500
Organization: Hassler Communication Systems Technology, Inc.
Lines: 40
Message-ID: <5ft5sj$qh@alpha.hcst.com>
NNTP-Posting-Host: alpha.hcst.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm compiling a program I wrote.  It has three key modules:

llist.h/llist.cc 
- This is a Templated linked list class, with virtual functions.
  I've been using it with no problems.

universe.h/universe.cc
- This is the main object for my program, it has four key funcitons
  that are called:
  Initialize();
  Execute();
  ShutDown();

  It also has another class in it called OBJECT, which is stored in
  the main class via a linked list.  It has an 
  operator == (const OBJECT &obj)
  function in it.

univtest.cc
- This program creates an instance of hte Universe object, and
  simply calls the three procedures.  

Now, when I compile, everything compiles fine, but the link process
gives me an error.  I have no idea what it means:
file.cc/h: undefined reference to 
'OBJECT::operator == (const OBJECT &obj)'

and

file.cc/h: undefined reference to 'OBJECT virtual table'

What does that second one mean?  The Linked list has always 
worked before (and I do include the UNIVERSE.H file in the
LLIST.CC file and use the -no-implicit-templates to work 
around the current template bug in gcc). So why do I still
get teh first error?  Most (if not all) functions are virtual.

Why doesn't this link?  What does that second error mean?
It makes no sense.  I don' teven know where to start looking
for a problem.

- Raw text -


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