Article View: comp.std.c++
Article #2410Re: Header file inclusion and multiple directories
From: Marco Dalla Gasperina
Date: Fri, 03 Nov 1995 03:27
Date: Fri, 03 Nov 1995 03:27
37 lines
1518 bytes
1518 bytes
matt@cyclops5.berkeley.edu (Matt Austern) wrote:
>
>Consider a project that spans several directories. In particular,
>let's suppose it has the files project/d1/base.h,
>project/d1/derived.h, and project/d2/main.cc. Here are some code
>fragments.
>
>// project/d1/base.h
>class B {/* ... */};
>
>
>// project/d1/derived.h
>#include "base.h"
>
>class D : public B { /* ... */ };
>
>
>// project/d2/main.cc
>#include "../d1/derived.h"
>
>int main() { /* ... */ }
How about leaving it up to the invocation of the compiler?
// project/d2/main.cc
#include "derived.h"
int main() { /* ... */ }
cc -c -I ../d1 main.cc
marco
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<47bplf$ffq@news.vcd.hp.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backReferences:
<MATT.95Nov2152444@cyclops5.berkeley.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back Date: 03 Nov 95 03:27:41 GMT Approved: fjh@cs.mu.oz.au From: Marco Dalla Gasperina <Marco_Dalla-Gasperina@HP-Vancouver-om1.om.hp.com> Newsgroups: comp.std.c++ Subject: Re: Header file inclusion and multiple directories X-Original-Date: 3 Nov 1995 01:01:35 GMT Organization: Hewlett-Packard Vancouver Site Message-ID: <47bplf$ffq@news.vcd.hp.com> References: <MATT.95Nov2152444@cyclops5.berkeley.edu> X-Mailer: Mozilla 1.1N (Windows; I; 32bit) X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMJmMauEDnX0m9pzZAQGkYgF7B1k989suq6CRTN8t+ULb7fPs10HJiH8P Of5k8sBjyidgJyBwInH0N9YSHVkOy8gM =Vb/Q