Operating System - OpenVMS
1752615 Members
4507 Online
108788 Solutions
New Discussion юеВ

Re: Link error - %ILINK-W-USEUNDEF, undefined symbol _MOVC5 referenced

 
Muldowney_E
Occasional Contributor

Link error - %ILINK-W-USEUNDEF, undefined symbol _MOVC5 referenced

Hi,

I am investigating porting c code from an Alpha (OpenVMS 7.2) to Itanium (8.3). I get the above error when I try to link some sources. I also have the same issue with _MOVC3. Any help would be very much appreciated.
Thanks,
Eamon.
4 REPLIES 4
Kris Clippeleyr
Honored Contributor

Re: Link error - %ILINK-W-USEUNDEF, undefined symbol _MOVC5 referenced

Hi,
I haven't got a clue why the USEUNDEF is signalled, but the "OpenVMS MACRO Porting and User Guide" advises to replace MOVC3 and MOVC5 instructions with calls to OTS$MOVx functions.
Maybe this can be done in the C-sources also?
Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Kris Clippeleyr
Honored Contributor

Re: Link error - %ILINK-W-USEUNDEF, undefined symbol _MOVC5 referenced

Hi again,

Just remembered...
The _MOVC3 and _MOVC5 were builtin functions for the DEC C compiler on VAX, but aren't (anymore) on Alpha nor on Integrity.

Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Richard Brodie_1
Honored Contributor

Re: Link error - %ILINK-W-USEUNDEF, undefined symbol _MOVC5 referenced

These things are builtins corresponding to VAX assembly instructions. If that's all you're missing, reimplementing them from scratch is about as hard as writing your own strcpy.

However, you might like to check that your source doesn't have #ifdef ALPHA or similar. It's possible that you're including the VAX portion of conditionally compiled code.
Hoff
Honored Contributor

Re: Link error - %ILINK-W-USEUNDEF, undefined symbol _MOVC5 referenced

Please post a reproducer; the affected source code. Thanks.

Please post the compilation command used with the code, too.

The manuals here have some details on the builtins (and some changes that have occurred), but it can be easy to forget the #include declaration, too. (This was also what happened when #pragma builtins gets specified.)

Also use CC /WARN=ENABLE=QUESTCODE, and the usual suggestions around consideration of __NEW_STARLET and such.