Operating System - OpenVMS
1827741 Members
3037 Online
109969 Solutions
New Discussion

Re: /name=(as_is) and X11

 
SOLVED
Go to solution
Martin P.J. Zinser
Honored Contributor

/name=(as_is) and X11

Hi,

I need to make a library written in C compatible
with /name=(as_is) (i.e. preserve case for function names etc). Compiling the lib and some example code that way is no problem. But, if I try to link in the DECwindows shareable images the command fails to find the symbols of the X routines). How do I fix this?

(Tested with VMS Alpha 7.3 and 7.3-2, CC 6.5)

Greetigns, Martin
5 REPLIES 5
Kris Clippeleyr
Honored Contributor
Solution

Re: /name=(as_is) and X11

Martin,

I think you have to get hold of "The Jackets" (aka the OpenVMS Porting Library). In that kit you'll find the file MOTIF_REDEFINES.H that redefines (almost) all mixed case X-routine names to uppercase.
You have to include that file in your .C sources.
I think the DECW$* shareables still have only uppercase names in their symbol tables.

Greetz,

Kris
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Craig A Berry
Honored Contributor

Re: /name=(as_is) and X11

Macro redefinitions do seem like the way to go here, particularly if they've already been done and you can just plug them in. Other options require you to have a bit more of the overall system under your control. For example, if you map the symbols yourself at run-time using lib$find_image_symbol, you can look up the symbol as is, and then if it fails try again with an upcased version of the symbol. If you are creating the shareable images yourself, you can use upper case aliases in the linker options file. I think this latter option is what most of the system libraries do now, but apparently not DECWindows.
Robert Gezelter
Honored Contributor

Re: /name=(as_is) and X11

Martin,

I have encountered a similar problem on several occasions. I have found it more efficient to use the LINKER alias capabilities in the symbol vector definition (and the exact case support) to define multiple alias entry points for the same actual code (e.g., upper, lower, and mixed -case).

In particular, when working with code bases where I cannot predict whether the user will be compiling with AS_IS because of a restriction imposed by another library. This little trick simplifies things tremendously.

- Bob Gezelter; http://www.rlgsc.com
Jan van den Ende
Honored Contributor

Re: /name=(as_is) and X11

Hi Bob,

GREAT to (finally) meet you here!
Looking forward to much more of your knowledge!!

Cheers.

Have one on me.

Jan
Don't rust yours pelled jacker to fine doll missed aches.
Martin P.J. Zinser
Honored Contributor

Re: /name=(as_is) and X11

Hello,

well, full points for the help provided here,
unfortunatly not such a perfect score for hp.

Kris suggestion is the way to go for this particular problem. Unfortunatly the porting
library is not very modular and you have to jump through some hoops to actually make it work.

That the DECW libraries do not support this natively is a shame.

I shall look into the suggestion with the alias
names later, for know you can compile the stuff any way you like, so if you have a need for upper/lower/as_is you can always do it that way.

Thanks a lot for the help.

Greetings, Martin