By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,301 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,301 IT Pros & Developers. It's quick & easy.

Are files in the same directory as a file being compiled automaticallyfound by a standard following compiler?

P: n/a
Hi,

Here's the thing: the Eternity persistence system does not
provide its own compilation phase for its source code: the
programmer simply has to copy some files to his codebase.

Here's the thing though: the author has a .cpp in the "src"
directory that contains the other .cpp files, "eternity.cpp",
which basically contains:

#include "dynamic.cpp"
#include "persist.cpp"
#include "persist_xml.cpp"
#include "xmlscanner.cpp"

The directory hierarchy of the package is something like this:

$ ls
include/ src/ doc/ test/ examples/ etc...

Thing is though, in the 'example' directory ("cd examples"), it
gets compiled by GCC like this:

g++ -c -I../include ../src/eternity.cpp

The 'dynamic.cpp' etc. files are all picked up automatically
without specifying a '-I' argument. Is this standard behaviour?

Thanks,
Asfand Yar

--
http://www.it-is-truth.org/
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Asfand Yar Qazi" <im_not_giving_it_here@i_hate_spam.com> wrote in message
news:c7**********@newsg1.svr.pol.co.uk...
Thing is though, in the 'example' directory ("cd examples"), it
gets compiled by GCC like this:

g++ -c -I../include ../src/eternity.cpp

The 'dynamic.cpp' etc. files are all picked up automatically
without specifying a '-I' argument. Is this standard behaviour?


The language standard has absolutely nothing to say about where
and how source files are located by your compiler. Each one is
free to do it in whatever way it wants. Read your compiler documentation,
and/or ask about this in a newsgroup that discusses it.

-Mike
Jul 22 '05 #2

P: n/a
Mike Wahler wrote:
"Asfand Yar Qazi" <im_not_giving_it_here@i_hate_spam.com> wrote in message
news:c7**********@newsg1.svr.pol.co.uk...

Thing is though, in the 'example' directory ("cd examples"), it
gets compiled by GCC like this:

g++ -c -I../include ../src/eternity.cpp

The 'dynamic.cpp' etc. files are all picked up automatically
without specifying a '-I' argument. Is this standard behaviour?

The language standard has absolutely nothing to say about where
and how source files are located by your compiler. Each one is
free to do it in whatever way it wants. Read your compiler documentation,
and/or ask about this in a newsgroup that discusses it.

-Mike


Actually, I remember somebody somewhere saying this was standard
C++ behaviour, which I was checking up on. Therefore it is a
relavent question. However, you answered it, so thanks.

--
http://www.it-is-truth.org/
Jul 22 '05 #3

P: n/a
Asfand Yar Qazi wrote:
Mike Wahler wrote:
"Asfand Yar Qazi" <im_not_giving_it_here@i_hate_spam.com> wrote in
message
news:c7**********@newsg1.svr.pol.co.uk...

Thing is though, in the 'example' directory ("cd examples"), it
gets compiled by GCC like this:

g++ -c -I../include ../src/eternity.cpp

The 'dynamic.cpp' etc. files are all picked up automatically
without specifying a '-I' argument. Is this standard behaviour?
The language standard has absolutely nothing to say about where
and how source files are located by your compiler.
Actually, I remember somebody somewhere saying this was standard C++
behaviour


Actually, the standard doesn't even require that there be actual header
"files".
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.