1828377 Members
3088 Online
109977 Solutions
New Discussion

VMS hlep required

 
rajni_chugh
New Member

VMS hlep required

Dear all,

We need some information on linking a C program on OpenVMS (AXP V7.3-2). I get the following messages when I try to link it:

AXP01> CC/DECC/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES CON2CW.c

AXP01> link CON2CW

%LINK-W-NUDFSYMS, 3 undefined symbols:

%LINK-I-UDFSYM, DECC$GA_OPTERR

%LINK-I-UDFSYM, DECC$GA_OPTIND

%LINK-I-UDFSYM, DECC$GA_OPTOPT



As a result while executing the program the following error is generated:

AXP01> run CON2CW
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=0000000000000000, PC=FFFFFFFF809A86A8, PS=0000001B

%TRACE-F-TRACEBACK, symbolic stack dump follows
Basically this program was written for HP-UX 11i and we want to use it on OpenVMS also.
It contains typical C/UNIX statements like

getenv()

putenv()

alarm()

execl()

kill()

waitpid()



Will these statements be valid on OpenVMS or we need to find some substitutes for them? Also, if you could give any pointers to C programming documentation on OpenVMS, it would be a great help.

Please reply back ASAP.

Thanks and Regards,
Rajni.

9 REPLIES 9
Ian Miller.
Honored Contributor

Re: VMS hlep required

I think your program is calling command line processing routines optopt, optind etc.

C documentation is at
http://h71000.www7.hp.com/commercial/c/index_alpha.html

including the runtime library manual which documents which functions are available (such as getopt and so on).
____________________
Purely Personal Opinion
Steven Schweda
Honored Contributor

Re: VMS hlep required

With VMS V7.3-2, I'd expect this to work. (Of
course, I haven't seen the source.)

/DECC is effective only on a VAX, and
/PREFIX=ALL is normally the default, but both
should be harmless.

Which C compiler are you using?

CC /VERSION

Does your source file do
"#include " and/or
"#include "?

You might add /LIST /SHOW = ALL to the CC
command, and look in xxx.LIS to see if
anything odd is happening to "optind".

Also, LINK /MAP /CROSS, and look in xxx.MAP.

The VMS C run-time library keeps gaining
functions (but so do the UNIX ones). Your
list looks pretty safe.

HELP CRTL function_name
or, on older systems:
HELP CC Run-time function_name

My instant test case on my XP1000 seems to be
turning "optind" into DECC$GL_OPTIND, not
DECC$GA_OPTIND (and finding it in
DECC$SHR_EV56, one of the normal shared
libraries).

Here:

alp $ cc /version
HP C V7.1-015 on OpenVMS Alpha V7.3-2

You might wish to visit:
ftp://ftp.compaq.com/pub/products/C-CXX/openvms/c/
Steven Schweda
Honored Contributor

Re: VMS hlep required

Also, the C run-time library is included
with the OS, so the best Web reference is
at (or near):

http://h71000.www7.hp.com/doc/index.html

http://h71000.www7.hp.com/doc/os732_index.html

http://h71000.www7.hp.com/doc/732FINAL/5763/5763PRO.HTML

Run-time info which came with an old compiler
is probably obsolete.
John Yu_1
Valued Contributor

Re: VMS hlep required

Since you're getting errors on link, check your logicals for LNK$LIBRARY*. You should be pointing at the correct .OLB files
Artificial intelligence is rarely a match for natural stupidity.
Steven Schweda
Honored Contributor

Re: VMS hlep required

> [...] check your logicals for LNK$LIBRARY*.

Most likely, you don't want any LNK$LIBRARY*
logical names.
Antoniov.
Honored Contributor

Re: VMS hlep required

Hi Rajni,
welcome to VMS forum.

You posted too little informations so I can just give you some hint.
You can help abour runtime library issuing
$ HELP CC RUN
or
$ HELP RTL

getenv and putenv functions require header.
exec function family, alarm function require header.
kill function requires header.
waitpid function requires header.
If you ported your application from unix, perahps you might forget header.

See you soon.
Antonio
http://it.openvms.org
Antonio Maria Vigliotti
Steven Schweda
Honored Contributor

Re: VMS hlep required

> $ HELP RTL

This provides inormation on VMS run-time
library functions, not C run-time library
functions. As suggested days ago, it's "HELP
CRTL" (or HELP CC Run-time") for the C
run-time library.
Antoniov.
Honored Contributor

Re: VMS hlep required

Sorry,
I made a typo.
Since V7.3 CC runtime help is
$ HELP CRTL

Antonio
http://it.openvms.org
Antonio Maria Vigliotti
Shashikant_B
Occasional Advisor

Re: VMS hlep required

Hi All,

Thank you very much for the help.
The code is running now, but the strange thing is it runs when i give PRC$M_DETACH.
Since i wanted to create a detached process, so this is working now.

Regards,
Rajni.