- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- /NAMES=(AS_IS,SHORTENED) and /NAMES=(UPPERCASE,TRU...
Operating System - OpenVMS
1819696
Members
3389
Online
109605
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2007 03:32 AM
тАО06-12-2007 03:32 AM
/NAMES=(AS_IS,SHORTENED) and /NAMES=(UPPERCASE,TRUNCATED)
Does it exist a solution to this problem?
We are linking a lecacy ACMS-application against a new C++ library and the differenses in the libraries results in undefined symbols.
The symbols exists but in CamelCase (LikeThis) and the linker are looking for all uppercase since the ACMS code is compiled with the default /NAMES=(UPPERCASE,TRUNCATED).
Is there a way to get the linker to connect things compiled whith /NAMES=(UPPERCASE,TRUNCATED) and /NAMES=(AS_IS,SHORTENED)?
If not then it means that a resulting image containing some object code made with /NAMES=(AS_IS,SHORTENED) CAN NOT contain
ANYTHING compiled with the default /NAMES=(UPPERCASE,TRUNCATED)?
/Bo Fremling
BAE Systems H├дgglunds
Alpha Openvms 8.2
We are linking a lecacy ACMS-application against a new C++ library and the differenses in the libraries results in undefined symbols.
The symbols exists but in CamelCase (LikeThis) and the linker are looking for all uppercase since the ACMS code is compiled with the default /NAMES=(UPPERCASE,TRUNCATED).
Is there a way to get the linker to connect things compiled whith /NAMES=(UPPERCASE,TRUNCATED) and /NAMES=(AS_IS,SHORTENED)?
If not then it means that a resulting image containing some object code made with /NAMES=(AS_IS,SHORTENED) CAN NOT contain
ANYTHING compiled with the default /NAMES=(UPPERCASE,TRUNCATED)?
/Bo Fremling
BAE Systems H├дgglunds
Alpha Openvms 8.2
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2007 03:55 AM
тАО06-12-2007 03:55 AM
Re: /NAMES=(AS_IS,SHORTENED) and /NAMES=(UPPERCASE,TRUNCATED)
There are various tricks, but nothing that is guaranteed to work in all cases or avoid giving up something. Don't overlook the simple possibility of compiling the new C++ code with (UPPERCASE,TRUNCATED), though of course you may have symbols that are too long to get away with that.
One of the more robust options is to build the new library as a shareable image and use aliases in the linker options file, something like the following (but read the section on aliases in the Linker Utility manual):
MYLIB/SHAREABLE
CASE_SENSITIVE=YES
SYMBOL_VECTOR =
(CAMELCASE1/CamelCase1=PROCEDURE,-
CAMELCASE2/CamelCase2=PROCEDURE)
The alias names here are just uppercase versions of the actual routine names. They could also be shorter versions if necessary.
Other than that all the options I'm aware of revolve around doing your own shortening and upcasing instead of letting the compiler do it for you; for example you could have macros that redefine all the long symbol names to something shorter and all the mixed case names to something in upper case.
One of the more robust options is to build the new library as a shareable image and use aliases in the linker options file, something like the following (but read the section on aliases in the Linker Utility manual):
MYLIB/SHAREABLE
CASE_SENSITIVE=YES
SYMBOL_VECTOR =
(CAMELCASE1/CamelCase1=PROCEDURE,-
CAMELCASE2/CamelCase2=PROCEDURE)
The alias names here are just uppercase versions of the actual routine names. They could also be shorter versions if necessary.
Other than that all the options I'm aware of revolve around doing your own shortening and upcasing instead of letting the compiler do it for you; for example you could have macros that redefine all the long symbol names to something shorter and all the mixed case names to something in upper case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2007 04:02 AM
тАО06-12-2007 04:02 AM
Re: /NAMES=(AS_IS,SHORTENED) and /NAMES=(UPPERCASE,TRUNCATED)
If your externals are declared in header
files, it should be (relatively) easy to add
"#pragma names" directives to get the job
done. For example, bzip2 is normally
compiled with /NAMES = AS_IS, and the
Info-Zip Zip and UnZip programs are normally
compiled with (the default) /NAMES =
UPPERCASE, so to build, say, Zip with bzip2
support, it is compiled with /INCLUDE options
which direct it to use a special bzip2.h
header with some "#pragma names" directives
around its inclusion of the normal bzip2.h
header:
[...]
#pragma names save
#pragma names as_is
#include "INCL_BZIP2:BZLIB.H"
#pragma names restore
[...]
(where the logical name INCL_BZIP2 points to
the directory where the real bzip2.h
resides.)
This way, when compiling the Zip code, the
compiler will treat the bzip2 function names
AS_IS, but everything else with the usual
UPPERCASE. So, at link time, the linker will
be looking for mixed-case names in the bzip2
object library, even though all the other
external names are UPPERCASE.
The key is "#pragma names", and you can add
these to your code in different ways,
depending on how you would prefer to do
things. (The alternate header file seemed
like an easy way to avoid more "#ifdef VMS"
directives in the Zip code.)
files, it should be (relatively) easy to add
"#pragma names" directives to get the job
done. For example, bzip2 is normally
compiled with /NAMES = AS_IS, and the
Info-Zip Zip and UnZip programs are normally
compiled with (the default) /NAMES =
UPPERCASE, so to build, say, Zip with bzip2
support, it is compiled with /INCLUDE options
which direct it to use a special bzip2.h
header with some "#pragma names" directives
around its inclusion of the normal bzip2.h
header:
[...]
#pragma names save
#pragma names as_is
#include "INCL_BZIP2:BZLIB.H"
#pragma names restore
[...]
(where the logical name INCL_BZIP2 points to
the directory where the real bzip2.h
resides.)
This way, when compiling the Zip code, the
compiler will treat the bzip2 function names
AS_IS, but everything else with the usual
UPPERCASE. So, at link time, the linker will
be looking for mixed-case names in the bzip2
object library, even though all the other
external names are UPPERCASE.
The key is "#pragma names", and you can add
these to your code in different ways,
depending on how you would prefer to do
things. (The alternate header file seemed
like an easy way to avoid more "#ifdef VMS"
directives in the Zip code.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2007 04:05 AM
тАО06-12-2007 04:05 AM
Re: /NAMES=(AS_IS,SHORTENED) and /NAMES=(UPPERCASE,TRUNCATED)
And, of course, when I wrote "bzip2.h", I
meant "bzlib.h".
meant "bzlib.h".
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP