HP OpenVMS Systems

ask the wizard
Content starts here

C programming on OpenVMS? Libraries?

» close window

The Question is:

 
VAX C to DEC C Conversion.
 
We are converting our existing code from VAX C 5.4 to DEC C 5.7. We want to
fix our programs so that we can compile our code without using the
/STANDARD=VAXC and /PREFIX=ALL.
 
How do we handle the Run Time Libraries, the LIB$ and SYS$ calls. Do we need
to replace these calls with some equivalent code or can still use the VAX C
RTL's.
 
Also, as DEC C requies to include all header files explicitly in the source
code file. We are getting Global Symbol error (%LIBRAR-E-DUPGLOBAL) while
adding the object files to the library. Since now the common header files,
which also have some global va
riables, are included in all the source code files.
 
Please Help.
 
Thanks for your previous responses.
 


The Answer is :

 
  The OpenVMS system services and run-time library routines already have
  prefixes -- SYS$ and LIB$ -- which means these routines can be located
  in libraries that are searched by the LINKER by default.
 
  The usual solution for referencing RTL calls is to include standard
  header files such as starlet.h and lib$routines.h -- these two
  particular header files are used for the system services and the
  RTL LIB$ routines, respectively.
 
  For examples, please see areas such as SYS$EXAMPLES:, UCX$EXAMPLES
  or TCPIP$EXAMPLES, DECW$EXAMPLES:, the OpenVMS Freeware CD-ROMs,
  and websites such as:
 
http://www.partner.digital.com/www-swdev/pages/Home/TECH/faqs/ovms/ovms.html
 
  The DUPGLOBAL errors point to duplicate globals.  These references will
  need to be resolved in the object code being inserted in the libraries.
 
  Also of interest will be shareable images -- shareable images have a
  number of benefits over object libraries.  For information on shareable
  images, see the cookbook at:
 
http://www.partner.digital.com/www-swdev/pages/Home/TECH/faqs/ovms/ovms.html
 

answer written or last revised on ( 2-FEB-1999 )

» close window