Index: [thread] [date] [subject] [author]
  From: Tim Bain <tpb2@duke.edu>
  To  : 
  Date: Sun, 31 Jan 1999 15:52:25 -0500

Re: Makefile

Austin Fath wrote:

> I don't want the tapestry, I just want the stl library, but I keep getting
>
> [7] jaf13@godzilla1% gmake depend
> makedepend --  -g -Wall  -- -Y main.cc exptree.cc
> makedepend: warning:  main.cc, line 1: cannot find include file "iostream.h"
> makedepend: warning:  main.cc (reading exptree.h, line 6): cannot find include
> f
> ile "iostream.h"
> makedepend: warning:  main.cc (reading exptree_aux.h, line 1): cannot find
> inclu
> de file "iostream.h"
> makedepend: warning:  main.cc (reading exptree_aux.h, line 2): cannot find
> inclu
> de file "string"
> makedepend: warning:  main.cc, line 3: cannot find include file "stdlib.h"
> makedepend: warning:  exptree.cc, line 2: cannot find include file "iostream.h"
>
> The program only compiles with gmake and I can not get strings, only
> (const class basic_string<char,string_char_traits<char>
>
> I even copied the Makefile from Duvall's directory and I got the same errors.
>
> Help.

Sounds like it's just the syntax of your #include lines.  I'm
not completely sure with exactly how it works (someone
out there correct me if I get this wrong), but I believe that
any file to be included that is in the same subdirectory as
the code you're compiling has quotes put around it:

#include "exptree.h"

Any file to be included that is in a different subdirectory
must have < and > around it:

#include <iostream.h>

For this second type to work, you have to have specified
the directory where the file is located as one of the paths
for included files, by passing that path with the -I flag to
the compiler.  (Our Makefile is set up to pass the path
/afs/acpub/o/l/ola/lib to the compiler for this, since that
directory is where most of the .h files we use are...)

So, if you're trying to include files (such as iostream.h
and string) that are located in the /afs/acpub/o/l/ola/lib
directory, all you should need to do to fix your problem
is to change from #include "iostream.h" to
#include <iostream.h>.

Tim



Index: [thread] [date] [subject] [author]