www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/24/13:38:58

From: bryan AT alpha DOT hcst DOT com (Bryan Murphy)
Newsgroups: comp.os.msdos.djgpp
Subject: Problem Compiling C++ with DJGPP
Date: 24 Feb 1997 11:30:06 -0500
Organization: Hassler Communication Systems Technology, Inc.
Lines: 17
Message-ID: <5esfme$ire@alpha.hcst.com>
NNTP-Posting-Host: alpha.hcst.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

DJGPP.  When I write two or more .cc modules, and try to
link them together, I get a ton of "Undefined Reference"
errors.  These are all related to my procedures, and not
the ones in teh C++ libraries (those I instaled).  What
am I not getting right?  If I #include "prog.cc" all the
.cc files into the main program, it compiles properly and
the program runs, but it won't link if they are compiled
as separate modules.  Do I have to extern all the functions
and classes in the .h files?  I didn't think that was
necessary.  Here is the command line I'm using, the files
are very basic and compile properly:

gcc test.cc inilib.cc llist.cc -lgpp -liostream

I've evern tried it with -O3 and -x c++ to no avail.


- Raw text -


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