[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::axp-developer

Title:Alpha Developer Support
Notice:[email protected], 800-332-4786
Moderator:HYDRA::SYSTEM
Created:Mon Jun 06 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3722
Total number of notes:11359

3586.0. "NT Software AB - Point 27550" by KZIN::ASAP () Tue May 06 1997 04:15

    Company Name :  NT Software AB - Point 27550
    Contact Name :  Jan Sunneb�ck
    Phone        :  +46 8 3248 10
    Fax          :  
    Email        :  [email protected]
    Date/Time in :   6-MAY-1997 08:14:44
    Entered by   :  John Wood
    SPE center   :  REO

    Category     :  vms
    OS Version   :  6.1
    System H/W   :  


    Brief Description of Problem:
    -----------------------------

From:	RDGENG::MRGATE::"RDGMTS::PMDF::mail.dec.com::LennonD"  5-MAY-1997 17:03:26.46
To:	RDGENG::ASAP
CC:	
Subj:	POINT 27550, NT Software AB

From:	NAME: Declan Lennon <[email protected]@PMDF@INTERNET>
To:	NAME: '[email protected]' <IMCEAX400-c=US+3Ba=+20+3Bp=DIGITAL+3Bo=SBUEURMFG+3Bdda+3ASMTP=asap+40reo+2Emts+2Edec+2Ecom+3B@mail.dec.com@PMDF@INTERNET>

Hello -

POINT Log Number	 27550
Company Name 	NT Software AB	
Engineers name	Jan Sunneb�ck
Telephone Number 	+46 8 3248 10
Fax Number		
E-mail Address	<[email protected]>

Operating System, Version	OpenVMS, V6.1/V6.2
Platform			

Problem Statement		

From: 	Jan Sunneb�ck <[email protected]>[SMTP:Jan Sunneb�ck 
<[email protected]]
Sent: 	05 May 1997 14:05
To: 	asap_euro
Subject: 	Linking object C object modules on Alpha/OpenVMS

Hi,

our ASAP number is A71017, and here is my question:

There seems to be some problems connected with linking C object 
modules
under OpenVms 6.1 if these modules were compiled under 6.2, is that 
so?

We are distributing a software package that we've compiled (a 
combination of
Pascal, C and Macro code) on an Alpha running OpenVms 6.2. On the 
target
machine we link the executables but we get the following error 
messages when
doing this:

%LINK-I-UDFSYM DECC$$GA___CTYPET
%LINK-I-UDFSYM DECC$$GL___CTYPEA

We use cc/standard=vaxc when compiling.

What to do?

Best regards,

Jan Sunneback

NT software AB
Stockholm
Sweden





In replying, please use [email protected]




RFC-822-headers:
Received: from reoexc1.reo.dec.com by rg71rw.reo.dec.com (PMDF V5.0-7 #15552)
 id <[email protected]> for [email protected]; Mon,
 05 May 1997 17:02:46 +0100
Received: by reoexc1.reo.dec.com with SMTP
 (Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63)
 id <[email protected]>; Mon, 05 May 1997 17:03:47 +0100
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
T.RTitleUserPersonal
Name
DateLines
3586.1RDGENG::WOOD_J[email protected]Tue May 06 1997 04:5998
Date:	 6-MAY-1997 08:54:53.51
From:	DEC:.REO.REOVTX::WOOD_J       "[email protected]"
Subj:	Digital ASAP #27550: Linking C object modules on OpenVMS Alpha
To:	smtp%"[email protected]"
CC:	WOOD_J

Hello Jan,

RE: Linking C object modules on Alpha/OpenVMS

> There seems to be some problems connected with linking C object modules under
> OpenVms 6.1 if these modules were compiled under 6.2, is that so?

Well, as a general rule this has never been supported, although by taking
copies of the v6.1 run-time libraries, etc., it can be possible to do so.


> We are distributing a software package that we've compiled (a combination of
> Pascal, C and Macro code) on an Alpha running OpenVms 6.2. On the target
> machine we link the executables but we get the following error messages when
> doing this:
>
> %LINK-I-UDFSYM DECC$$GA___CTYPET
> %LINK-I-UDFSYM DECC$$GL___CTYPEA

These are DEC C undefined symbols.

The DEC C compiler became aware of which VMS version it is being run on since
the DEC C v5.2 release.

The two symbols above come from the <ctype.h> header-file. From that file:

    #if __VMS_VER >= 60200000
    #   define __ctypet    (*decc$$ga___ctypet)
    #   define __ctypea    (decc$$gl___ctypea)
    ...

Thus if you want to compile on OpenVMS v6.2, but be able to target OpenVMS
v6.1, then you'll need to do the following (-extracted from the DEC C Run-Time
Library manual, section 1.5.4:

++++
1.5.4  Multiple-Version-Support Macro

   By default, the header files enable APIs in the DEC C RTL
   provided by the version of the operating system on which the
   compilation occurs. This is accomplished by the predefined
   setting of the __VMS_VER macro, as described in the  DEC C
   User's Guide for OpenVMS Systems. For example, compiling
   on OpenVMS Version 6.2 causes only DEC C RTL APIs from
   Version 6.2 and earlier to be made available.

   Another example of the use of the  __VMS_VER macro is sup-
   port for the 64-bit versions of DEC C RTL functions available
   with OpenVMS Alpha Version 7.0 and higher. In all header
   files, functions that provide 64-bit support are conditionalized
   so that they are visible only if __VMS_VER indicates a version of
   OpenVMS that is greater than or equal to 7.0

   To target an older version of the operating system, do the
   following:

    1.  Define a logical DECC$SHR to point to the old version of
        DECC$SHR. The compiler uses a table from DECC$SHR
        to perform routine name prefixing.

    2.  Define __VMS_VER appropriately, either with the /DEFINE
        qualifier or with a combination of the  #undef  and  #define
        preprocessor directives. With /DEFINE, you may need to
        disable the warning regarding redefinition of a predefined
        macro.
----

Thus you'll need to obtain a copy of sys$share:DECC$SHR.EXE from an OpenVMS
v6.1 system, call it something like sys$share:decc$shr_61.exe, and do something
like:

    $ DEFINE DECC$SHR SYS$SHARE:DECC$SHR_61

you'll need to compile with 

    $ CC /DEFINE=__VMS_VER=60100000 

and maybe add

        /WARN=DISABLE=MACROREDEF 

to disable warnings about __VMS_VER being redefined.

Hope this helps.

Regards,
  John Wood
  Digital Equipment Co.