TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: LARRY OLSON 72227,3467
date: 1992-11-04 01:11:24
subject: #C help

#: 16913 S12/OS9/68000 (OSK)
    04-Nov-92  01:11:24
Sb: #C help
Fm: LARRY OLSON 72227,3467
To: all



   I wonder if someone could give me some tips on how to break up a C program
into a couple of routines that can be compiled separately then linked.
   The one big chunk of program that I would like to separate and compile
contains just screen setup and drawing functions, and the only variables that
this routine would need access too from the rest of the program, are
Window_path, and Process_ID. I have these variables now as EXTERNAL STATIC.,
   Say the program as it is now is called TEST, and I want to break it up into
TEST_1 & TEST_2. All the variables are defined in TEST_1, while the 2 variables
that TEST_2 needs are defined in TEST_1 as external.
    How do I compile TEST_2 by itself and yet let it know that the 2 variables
that it needs are defined in TEST_1.
    Then how do I compile TEST_1 and link the already compiled TEST_2 to it?

  getting deeper and deeper
   Larry Olson



There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.