www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/19/13:19:00

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Compiling problem
Date: 19 Oct 2001 17:14:01 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 24
Message-ID: <9qpn0p$3t0$1@nets3.rz.RWTH-Aachen.DE>
References: <007301c15846$1208b4c0$0101a8c0 AT hernan> <9qoubi$asj$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <000e01c158c0$9b65f500$0101a8c0 AT hernan>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1003511641 4000 137.226.32.75 (19 Oct 2001 17:14:01 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 19 Oct 2001 17:14:01 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

R. Grela <rgrela AT ciudad DOT com DOT ar> wrote:
> If I try gxx -c test.h where in test.h I ve all the template code
> I receive: gcc.exe: Compilation of header file requested

And correctly so. What made you believe you're supposed to compile
test.h?

Just:

1) copy the code from your former test.cpp to the end of test.h, if you 
   haven't already done that.

2) #include "test.h" from main.cpp.

3) Now you can straightforwardly compile and link main.cpp alone:

	gxx -c main.cpp
	gxx -o main.exe main.o

and that's it. 

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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