2 simple questions from a beginner
Brian K. W. Hook
jdb at reef.cis.ufl.edu
Fri Mar 8 00:15:02 AEST 1991
In article <63740 at eerie.acsu.Buffalo.EDU> v056ped5 at ubvmsb.cc.buffalo.edu writes:
>
>I am using Turbo C...
>
>Q1:
> I have three files, each with a header file. Call them A,B,C.
>
>A.c calls B.c and C.c as well as B.h and C.h
>B.c calls B.h and A.h
>C.c calls C.h and A.h
>They all call another .lib file
Make a .PRJ file (if you are using Turbo C++, should be something like it
in plain TC).... Next, it is a pretty bad habit on DOS machines to include
.C files....instead, just put them on the .PRJ file or .MAK file to be
linked in and you will avoid a LOT of potential conflicts.
.H files should be able to be included as many times you need during the
build....however, some do this:
#ifndef __INCLUDE_NAME_H
#define __INCLUDE_NAME_H
....
#endif
This is to avoid multiple inclusions.
Brian
More information about the Comp.lang.c
mailing list