Re: problem with multiple source file
- From: Ben Bacarisse <ben.usenet@xxxxxxxxx>
- Date: Tue, 08 Apr 2008 17:09:04 +0100
pereges <Broli00@xxxxxxxxx> writes:
On Apr 8, 7:05 pm, Ben Bacarisse <ben.use...@xxxxxxxxx> wrote:<snip>
pereges <Brol...@xxxxxxxxx> writes:
I hae compiled and executed codes of vector.c, reader.c , test.c
seperately and they can be execute in proper manner and give correct
outputs but when i tried to integrate them all into a single project
using pelles C it is giving two many errors.
You could help people out with an error message!
You have got tied up in includes, trying to get common.h to do
everything.
I could post error messages but theres just way too many.
The first one is (almost) always the most revealing one.
I think
change my approach. In my project, vector data structure and
operations are meant to be seen by every module so I will put that it
into common.h along with some common header files like stdio, stdlib ,
string and math which are needed almost every module. Suppose
all.h
a.h a.c
b.h b.h
c.h c.c
Now each of the .h's file should include all.h and every .c file will
include its corresponding .h file. I think then in main.c you need to
include all the headers including all.h
I don't see why you object to just including in each .c file what is
needed by that .c file. That is my preferred method for programs of
this sort of size.
There are times when a well organised program can have "grouped" .h
files that pull in related sets of types and functions, but your
program is not at that sort of size yet.
This is just a suggestion. You've got tied up once already, so why
not try the plain method first. You may like it.
--
Ben.
.
- References:
- problem with multiple source file
- From: pereges
- Re: problem with multiple source file
- From: Ben Bacarisse
- Re: problem with multiple source file
- From: pereges
- problem with multiple source file
- Prev by Date: Re: sizeof()'s strange behviour
- Next by Date: Re: sizeof()'s strange behviour
- Previous by thread: Re: problem with multiple source file
- Next by thread: Re: problem with multiple source file
- Index(es):
Relevant Pages
|