Article View: comp.sys.amiga.tech
Article #10200Re: Manx precompiled include files
From: hummel
Date: Wed, 02 Nov 1988 16:12
Date: Wed, 02 Nov 1988 16:12
35 lines
2053 bytes
2053 bytes
Written 9:20 am Oct 31, 1988 by collins@pnet02.cts.com in comp.sys.amiga.tech:
/* ---------- "Manx precompiled include files" ---------- */
> I am using Manx 3.6 a which supports pre-compiled include files.
> [ ... ] When I try to precompile a file containing somthing like:
>
> struct my_structure structure1= {
> a bunch of structure intializers
> };
> and then subsequently link it, I get a global called structure1, but
> it is uninitialized.
/* End of text from comp.sys.amiga.tech */
Precompilation works by dumping the symbol table to a file and reading it
back in. There's no initialization information contained in the symbol
table, hence none gets saved. Paul and I wound up doing precompilation in
PDC 3.3 this way, and I'd imagine Jim Goodnow did the same when he implemented
Manx. The bottom line is that you can't have initialized data in a pre-
compiled header.
In the same posting, he asks:
> What's the smart way to initialize a bunch of structures that contain
> 20-30 element arrays of LONGS? I mostly want to avoid making the
> compiler chew on them every debugging cycle.
Compile them in their own .c file and link with the resulting .o file.
How's that?
< Lionel
----------
Lionel Hummel 404 W. High St., #6
ldh90267@uiucuxa.cso.uiuc.edu Urbana, IL 61801
{seismo,pur-ee,convex}!uiucuxa!ldh90267 (H) (217)344-5303
Dept. of Computer Science (W) (217)333-7408
University of Illinois, Urbana-Champaign
Technical Details
Message-ID:
<212300001@s.cs.uiuc.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!hummelReferences:
<8327@gryphon.CTS.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!hummel From: hummel@s.cs.uiuc.edu Newsgroups: comp.sys.amiga.tech Subject: Re: Manx precompiled include files Message-ID: <212300001@s.cs.uiuc.edu> Date: 2 Nov 88 16:12:00 GMT References: <8327@gryphon.CTS.COM> Lines: 35 Nf-ID: #R:gryphon.CTS.COM:8327:s.cs.uiuc.edu:212300001:000:1518 Nf-From: s.cs.uiuc.edu!hummel Nov 2 10:12:00 1988