Mail Archives: djgpp/1999/04/01/19:29:43
Eli Zaretskii wrote:
> Do you use the #include directive to include the code of `VM_GetBack'?
> If so, this is a known problem; see section 12.8 of the FAQ for
> explanation and some solutions.
Hans-Bernhard Broeker wrote:
> You should never have nor want to #include a .cc file into another.
> That's your part of the responsibility for that problem,
> originally. If your program has more than one .cc file, compile each
> of them to its own .o file, and link them together. #include is for
> header files, and *only* for them. That's why Eli spoke about inline
> functions: only they (as they will be in the header file) should
> normally be #included in another .cc file.
That's right!
I've found, that I made a mistake. Since I'm self-learning C I didn't know that
I can't include .c file to main file. My first contact with C was with Borland
C and wasn't using a project files. First time I've met projects in Rhide, but
old habbit stayed and I've #included .cc into main .cc project file. Now I know
that I shouldn't do that, but I didn't know that before. Thank You Eli and Hans
for help. Thanx!
Bartek
- Raw text -