[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference smurf::buildhelp

Title:USG buildhelp questions/answers
Moderator:SMURF::FILTER
Created:Mon Apr 26 1993
Last Modified:Mon Jan 20 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2763
Total number of notes:5802

223.0. "Including .c files within a .c file" by SMURF::FILTER (Automatic Posting Software - mail to flume::puck) Mon Jul 19 1993 19:07

Date Of Receipt: 	19-JUL-1993 17:08:51.74
From: 	MINSRV::"[email protected]"
To: 	[email protected]
CC: 	
Subj: 	Including .c files within a .c file

Is it possible to include .c files from within a .c file using the syntax

		include "file1.c"
		include "file2.c"


Rich
----------------------------------------------------------------
Rich Larsen, M/S: UNX			TCP/IP: [email protected]
USSG/User Env. & Std. Group		DECnet: UNXA::LARSEN
Digital Equipment Corporation		FAX:	908-577-6003
200 Route 9 North			Voice:	908-577-6083	
Manalapan, New Jersey 07726		DTN:	462 

T.RTitleUserPersonal
Name
DateLines
223.1re: Including .c files within a .c fileSMURF::FILTERAutomatic Posting Software - mail to flume::puckMon Jul 19 1993 19:0846
Date Of Receipt: 	19-JUL-1993 17:34:45.22
From: 	WASTED::jmf "Joshua M. Friedman ULTRIX SDE  19-Jul-1993 1734"
To: 	[email protected]
CC: 	odehelp@wasted:zko.dec
Subj: 	re: Including .c files within a .c file

Rich, the answer's yes.  The includes follow the same include syntax as
.h's.  Please consult Kernigan and Richie's "C" programming "bible".
The Makefile, however, won't recognize this as a dependency automatically.
Typically, this is done by compiling multiple .c's into .o's and linking.

-josh

------- Forwarded Message

Return-Path: [email protected]
Received: by minsrv.zk3.dec.com (5.65/DEC-USSG-ZK3-ULTRIX-09/27/91);
	id AA14874; Mon, 19 Jul 1993 17:08:51 -0400
Received: by lars.unx.dec.com (5.65/MS-070792);
	id AA08655; Mon, 19 Jul 1993 17:08:31 -0400
Message-Id: <[email protected]>
To: [email protected]
Subject: Including .c files within a .c file
Date: Mon, 19 Jul 93 17:08:30 -0400
From: "Rich Larsen (908) 577-6083 DTN 462-6083 [email protected]" 
<[email protected]>
X-Mts: smtp


Is it possible to include .c files from within a .c file using the syntax

		include "file1.c"
		include "file2.c"


Rich
- ----------------------------------------------------------------
Rich Larsen, M/S: UNX			TCP/IP: [email protected]
USSG/User Env. & Std. Group		DECnet: UNXA::LARSEN
Digital Equipment Corporation		FAX:	908-577-6003
200 Route 9 North			Voice:	908-577-6083	
Manalapan, New Jersey 07726		DTN:	462 

------- End of Forwarded Message