From: Dima Sorkin <dsorkin@techunix.technion.ac.il>
To: gcc-help@gcc.gnu.org
Subject: order of headers lookup
Date: Tue, 02 Aug 2005 12:08:00 -0000 [thread overview]
Message-ID: <1122984523.42ef624b0ce82@webmail.technion.ac.il> (raw)
Hi.
This feature of gcc seems strange to me:
Consider a directory structure of a tiny project:
/main.cpp (#include "foo.hpp" )
/d1/bar.hpp
/d2/foo.hpp (#include "bar.hpp")
/d2/bar.hpp
then compiling
> g++ -I d1 -I d2 main.cpp -o main
will include /d2/bar.hpp instead of /d1/bar.hpp as I expected
( I expected so because "d1/" is listed first in "-I" options).
Such a behaviour of g++ limits the use of "sandboxes" in c++
projects ( consider the /d1/ directory as a sandbox of a real project).
Hope I don't miss something.
Thank you.
Dima.
next reply other threads:[~2005-08-02 12:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-02 12:08 Dima Sorkin [this message]
2005-08-02 14:15 ` Eljay Love-Jensen
[not found] ` <4a618d0805080205273aeb3054@mail.gmail.com>
2005-08-04 6:48 ` Dima Sorkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1122984523.42ef624b0ce82@webmail.technion.ac.il \
--to=dsorkin@techunix.technion.ac.il \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).