From: barnowl@blkbox.COM (Ken Williams)
Subject: Re: VAXC --> DECC
Date: 22 Oct 1994 14:13:51 -0500 [thread overview]
Message-ID: <38bo9f$h07@blkbox.blkbox.COM> (raw)
In-Reply-To: 1994Oct20.143252.20478@gdstech.grumman.com
jon@gdstech.grumman.com (Jon Kreisler) writes:
>I am about to take the plunge, converting from VAX C v3.2 to DEC C v4.0 on a
>VAX OpenVMS v5.5-2 system. I am aware of the problem of being unable to take
>an image created by DEC C and running it on a system only running the older
>libraries.
>I would like to know if anyone has had unpleasant experiences doing this
>conversion or if there are any other potential "headaches" to be wary of.
One thing that no one has mentioned that I've run into is the difference
in the external model. DEC C by default assumes that all external
variables are globals VAX C assumes that they are in common blocks. What
happens is that any variables not in functions show up during the link
step as undefined globals. To fix this in individual instances use a
#pragma compiler directive. I'm at home so I don't have the exact syntax
but, I think the syntax should be:
#pragma external_model common block
variable declarations
.
.
.
#pragma external_model relaxed refdef
There may also be a switch on the compiler to do something like this as
well but, I don't know what it is.
Ken Williams
barnowl@blkbox.com
PGP Key Available On Request
next prev parent reply other threads:[~1994-10-22 19:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-10-20 14:32 VAXC --> DECC Jon Kreisler
1994-10-20 21:59 ` Bob Koehler
1994-10-21 15:36 ` Jim Reuter
1994-10-22 19:13 ` Ken Williams [this message]
1994-10-25 12:44 ` Vociferous Mole
1994-10-27 18:57 ` Paul Repacholi
1994-10-27 22:16 ` Steve Lionel
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox