HP OpenVMS Systems

ask the wizard
Content starts here

C, Linker and lowercase names, symbols?

» close window

The Question is:

How can I specify a lower-case module in a LINK option file /INCLUDE directive?
I have an object module that has a lower case module name, because the source
 foo.c file was named in lower case on an ODS-5 volume. I want to explicitly
 include the module from an object library in a Linker .OPT file. When I
 specify the module name in lo
wer or upper case in a   mylib/INCLUDE=foo   option, the linker generates a
 "module not found" warning. When I put quotes around the lower case module
 name I got a syntax error. Apparently, you can use quotes on the LINK command
 line, but not in an option
s file /INCLUDE= specification.
I cannot put the /INCLUDE specification on the command line, it must be in an
 options file.
As a workaround, I put a   #pragma module_name FOO   directive in the (.c)
 source file, but I'd rather resolve this issue without a
source code change.

The Answer is :

  The OpenVMS Wizard would strongly encourage you to read the available
  C Programming documentation.  Particularly the documentation on using
  C on OpenVMS, as this covers this and a wide variety of other topics.
  If you are receiving lowercase errors such as this, these are not a
  result of the filenames involved, these errors are a result of the
  symbol names involved.  Barring comparatively unusual configurations
  within the ODS-5 Extended File Name environment, the OpenVMS file
  system is case-preserving and case-blind.  ODS-2 is always case-blind,
  and will uppercase all names for storage and subsequent use.
  Additionally and by default, OpenVMS is case insensitive and prefers
  to utilize case-blind processing on all symbols, and accordingly the
  compilers and the Linker use uppercase symbol names.
  If you prefer to avoid reading the C documentation -- again, the
  OpenVMS Wizard would strongly encourage you to read the available
  and very detailed documentation -- please see the /NAMES or analogous
  control mechanism within the compilers (of those languages that can
  provide case-sensitive symbols, of course), and please also see the
  CASE_SENSITIVE keyword mechanism available within the Linker options
  And you can use a preprocessor define to fix the casing of the name.
  If you wish to avoid having DCL uppercase the name as will occur (by
  default) on the LINK command and on any other input at the $ dollar
  prompt of DCL, you must quote the particular value.
  If you enable case sensitivity within the language, you may (will?)
  find situations where you have entered an incorrect case for a symbol
  and will thus have to recode your application.  The OpenVMS Wizard
  strongly discourages the use of multiple different symbols differing
  only in case, as this construction often leads to maintenance headaches.

answer written or last revised on ( 18-AUG-2003 )

» close window