From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,1c0da1fd51ed0485 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,1c0da1fd51ed0485 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-10-22 12:31:05 PST Path: bga.com!news.sprintlink.net!pipex!swrinde!news.uh.edu!uuneo.neosoft.com!blkbox.COM!not-for-mail From: barnowl@blkbox.COM (Ken Williams) Newsgroups: comp.sys.dec,comp.os.vms Subject: Re: VAXC --> DECC Date: 22 Oct 1994 14:13:51 -0500 Organization: The Black Box, Houston, Tx (713) 480-2686 Message-ID: <38bo9f$h07@blkbox.blkbox.COM> References: <1994Oct20.143252.20478@gdstech.grumman.com> NNTP-Posting-Host: blkbox.com X-Newsreader: NN version 6.5.0 #3 (NOV) Xref: bga.com comp.sys.dec:6569 comp.os.vms:20147 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