www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/13/17:59:03

Message-Id: <199711132255.JAA12202@rabble.uow.edu.au>
Subject: Re: cannot load header files
To: daniel DOT gowans AT m DOT cc DOT utah DOT edu (Daniel Gowans)
Date: Fri, 14 Nov 1997 09:55:27 +1100 (EST)
Cc: djgpp AT delorie DOT com (DJGPP)
In-Reply-To: <346A9A5B.A3B61F5C@m.cc.utah.edu> from Daniel Gowans at "Nov 12, 97 11:12:43 pm"
From: Brett Porter <bporter AT rabble DOT uow DOT edu DOT au>
MIME-Version: 1.0

> all of the io functions etc are undefined.  Yet if you look under the
> header search log section, then you can see that the c:\djgpp\lang\cxx
> directory was checked.  I know the files are there.  Why doesn't it load
> them?
> HELP
> 
This has found the header files, and in fact compiled. All a header file
does is _declare_ stuff, not define it. To define it you need to wither
write the routine in your code or include the library that has it. In your
case, the latter.

Put simply: you need to link a library with iostreams in it.

Try this:
gcc -o output.exe input.cc -liostream
                            ^^^^^^^^^
This does it all in one step. Or you could try

gcc -c file1.cc
gcc -c file2.cc
gcc -o output.exe file1.o file2.o -liostream

Anyway, it is the -liostream that is missing.

Regards,
Brett

-- 
"Those here who believe in telekenesis... raise MY hand!"
--
Brett Porter		--		blp01 AT uow DOT edu DOT au

	http://www.geocities.com/SiliconValley/Park/7483
	  Programming Stuff - DJGPP - The PAGOS Project

	http://www.geocities.com/CollegePark/Union/3596
		    Humour, University Life

- Raw text -


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