Article View: comp.sys.amiga.tech
Article #10192Re: Manx precompiled include files
From: Matt Dillon
Date: Tue, 01 Nov 1988 04:36
Date: Tue, 01 Nov 1988 04:36
33 lines
1786 bytes
1786 bytes
:I am using Manx 3.6 a which supports pre-compiled include files.
:For some reason, 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. The program works fine if I don't precompile
:but just include the file, but that means I'm always recompiling
:this big pile of structure inits.
:I realize that I may be going about the whole problem in a dumb way.
: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.
:On another topic,
Ow. I am not sure 'bout the restrictions of the precompiled
include files, but I never put things in them that would actually generate
code or declare space.
I heartily suggest you never put actual declarations in your
precompiled include files.
The solution to your problem: Simply put the declarations in a
separate .C file and, assuming you have make, it will only recompile it
if you change it. If you do not have make then it works the same way ...
you compile that .C file once (into an object), and unless you want to
change the initialization you never compile it again.
-Matt
Technical Details
Message-ID:
<8811010436.AA27604@cory.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!CORY.BERKELEY.EDU!dillonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga.tech Subject: Re: Manx precompiled include files Message-ID: <8811010436.AA27604@cory.Berkeley.EDU> Date: 1 Nov 88 04:36:57 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 32