delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/21/03:19:35

From: Alexander Borghgraef <aborghgr AT eduserv2 DOT rug DOT ac DOT be>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Newbie question: Linking in RHide
Date: Wed, 21 May 1997 00:07:42 +0200
Organization: Universiteit Gent
Lines: 43
Message-ID: <338220AE.3DD0@eduserv2.rug.ac.be>
References: <33814CF5 DOT F50 AT eduserv2 DOT rug DOT ac DOT be>
NNTP-Posting-Host: hades167.rug.ac.be
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Thanks to some replies from people in this ng I've managed to get rid
of the allegro problem, but I still get a bunch of 'undefined references
to '...'' error messages. The messages appeare for a number of 
constructors and destructors of a class defined in my file2 and a number
of functions I've defined in file3. The referencing structure of my
program is as follows:

file1.cc(main program)
#include <allegro.h>
...
#include "file2.h"


file2.cc(implementation file2.h)
#include <allegro.h>    //both use allegro routines
...
#include "file2.h"

file2.h(declaration of a class and it's 2 deriveds + 2 nonrelated voids)
#include "file3.h"

file3.cc(implementation of some friend functions for the vector
class          defined in file3.h)
#include "file3.h"

file3.h(declaration of a vector class + implementation inline
functions          and declaration of 4 friend functions)


All three .cc files compile normally without errors (numbers two and
three are implementations of *.h files, number one is the main program)
Why does this 'undefined reference ' error appear and what does it mean?
More important, how do I put my program together?

                                                   A.B. 
-- 
Darn right!  No government should be allowed to keep a tax-paying, god
fearing citizen from strapping a couple hundred thousand Estes rocket
motors to a kerosene tanker with the hope she'll make orbit.  If it 
lands on some stupid, third world country, well it serves them right 
for not investing in an ABM system!
     - Someone in sci.space.policy -

- Raw text -


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