473,320 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
3 1143

"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: JKop | last post by:
Here's what I know so far: You have a C++ project. You have source files in it. When you go to compile it, first thing the preprocessor sticks the header files into each source file. So now...
16
by: matthurne | last post by:
I just started learning C++ on my own...I'm using Accelerated C++. Something it hasn't explained and I keep wondering about is how header files actually work. I suspect it doesn't get into it...
11
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do...
3
by: pooja | last post by:
Suppose i have created a class c1 with f1()in c1.cpp and included this c1.cpp in file1.cpp file , which is also having main() by giving the statement #include "c1.cpp". the same i can do by...
11
by: JS | last post by:
I am a bit confused about the meaning of object files (.o). I read this in a make file: lotto: main.o init.o select.o sort.o display.o gcc main.o init.o select.o sort.o display.o -o lotto ...
5
by: Bas Hendriks | last post by:
Has anyone any idea how asp.net find it's files back after compiling them to the temporary asp.net directory? I found on numerous webpages that the directorynames are chosen random but cannot find...
1
by: akbar | last post by:
Hi, I am creating not-so-important opensource application written in python for Linux. I have two files python source in src directory, named blabla1.py and blabla2.py. There are byte compiled...
5
by: cwc5w | last post by:
//x.cpp #include <h1> #include "h2" which directory will C++ first look for when including h1? h2? Thanks!
1
by: yashgt | last post by:
Hi, We have an application that has been deployed into a virtual folder along with ascx, aspx and the code-behind files. It runs smoothly as long as we don't change any code-behind file. If we...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.