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

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3496.0. "Problem linking on 5.5-2 without RTL components" by KERNEL::BIRKINSHAW (Press Enter to Exit) Mon Mar 17 1997 11:47

My customer is attempting to link a program compiled on a 
6.2 system. He has followed the advice about creating the 
old syslib in the release notes but it seems that the image
still insists on linking against decc$shr and cma$tis_shr.

Can someone explain why this is? It seems to defeat the 
purpose of this workaround. I haven't got a Vax running 5.5-2
without the rtl components installed so I can't check this.

thanks in advance
Simon


POLAR_$show log sys$share
   "SYS$SHARE" = "SYS$SYSDEVICE:[OLD_SYSLIB]" (LNM$SYSTEM_TABLE)
        = "SYS$SYSROOT:[SYSLIB]"
POLAR_$show log sys$library
   "SYS$LIBRARY" = "SYS$SYSDEVICE:[OLD_SYSLIB]" (LNM$SYSTEM_TABLE)
        = "SYS$SYSROOT:[SYSLIB]"
POLAR_$!                  
POLAR_$!
POLAR_$!
POLAR_$dir sys$sysdevice:[old_syslib]/date/size

Directory SYS$SYSDEVICE:[OLD_SYSLIB]

CMA$LIB_SHR.EXE;2        23   8-JUL-1992 01:12:58.50
CMA$OPEN_LIB_SHR.EXE;1
                          8  17-OCT-1991 13:34:16.04
CMA$OPEN_RTL.EXE;2       24   8-JUL-1992 01:05:30.71
CMA$RTL.EXE;2           235   8-JUL-1992 01:05:11.59
SMGSHR.EXE;2            229   8-JUL-1992 00:50:59.28
VAXCRTL.EXE;2           209   8-JUL-1992 00:54:11.78
VAXCRTLG.EXE;2          209   8-JUL-1992 00:55:08.20

 type test.cxx
// This is the section 1 - program 1.  

void main()
{
}
POLAR>> cxx test
POLAR>> link test/map
POLAR>> 
POLAR>> anal/image test.exe


Analyze Image                                28-FEB-1997 15:30:25.90   Page 1
POLAR$DKA300:[CXXCOMP]TEST.EXE;12


IMAGE HEADER

        Fixed Header Information

                image format major id: 02, minor id: 05
                header block count: 1
                image type: executable (IHD$K_EXE)
                I/O channel count: default
                I/O page count: default
                linker flags:
                        (0)  IHD$V_LNKDEBUG   0
                        (1)  IHD$V_LNKNOTFR   0
                        (2)  IHD$V_NOP0BUFS   0
                        (3)  IHD$V_PICIMG     1
                        (4)  IHD$V_P0IMAGE    0
                        (5)  IHD$V_DBGDMT     1
                        (6)  IHD$V_INISHR     0
                        (7)  IHD$V_IHSLONG    1

        Image Activation Information

                first transfer address:  %X'7FFEDF68'
                second transfer address: %X'00000200'
                third transfer address:  %X'00000000'

        Global Symbol Table & Debug Symbol Table Information

                debug symbol table VBN:  4, block count: 1
                global symbol table VBN: 0, record count: 0
                debug module/psect table VBN: 0, byte count: 0

        Image Identification Information

                image name: "TEST"
                image file identification: "V1.0"
                link date/time: 28-FEB-1997 15:30:00.68
                linker identification: "05-13"

        Patch Information

                There are no patches at this time.

        Image Section Descriptors (ISD)

....skip this section for brevity........

IMAGE ACTIVATOR FIXUP SECTION


        Fixed Information

                Flags:
                        (0)  IAF$V_SHR        0
                shareable image count: 5
                extra image count: 0

        Shareable Image List

                0)  this image
                1)  "DECC$SHR"
                2)  "MTHRTL"
                3)  "LIBRTL"
                4)  "CMA$TIS_SHR"

        G^ Reference Fixups

                2 references to image 1:
                          00000528  00000000

        Protection Change Fixups (relative to %X'00000200')

                address: %X'00000200', page count: 1
                protection: PRT$C_UREW


T.RTitleUserPersonal
Name
DateLines
3496.1TLE::D_SMITHDuane Smith -- DEC C RTLTue Mar 18 1997 10:0629
    The problem is in the C library components placed into the 
    SYS$SYSDEVICE:[OLD_SYSLIB] area.  The components VAXCRTL.EXE
    VAXCRTLG.EXE are the VAX C runtime library shareable images,
    not the DEC C runtime library shareable images.  When compiling
    with the C++ compiler, it makes references to DEC C runtime 
    library global symbols.
    
    When linking the resultant object file, it resolves those globals
    from the DECC$SHR.EXE shareable image whose symbols are included
    in IMAGELIB.OLB on the V6.2 system.
    
    The DECC$SHR.EXE image was not distributed with OpenVMS V5.5-2 but 
    instead was made available via the CRT (C Run Time) kit.  The CRT
    kit is distributed as part of the DEC C and C++ compiler kits.
    
    What the user needs to do is unpack the CRT kit saveset into the
    SYS$SYSDEVICE:[OLD_SYSLIB] area being used in the link process. 
    Perhaps a command such as:
    
      $ BACKUP/SELECT=*.EXE AACRT060.A/SAVE SYS$SYSDEVICE:[OLD_SYSLIB]*.*;
    
    
    Note that linking against these shareable images implies that the CRT
    kit is also found on the target machine that will run the application.
    Redistribution of the CRT kit may be required.
    
    Duane