Saturday, March 08, 2008

The C Programming Language

To program using the C Programming Language on OpenVMS, you need the DEC C compiler.

$ run CC073.DCX_AXPEXE;1
$ @SYS$UPDATE:VMSINSTAL
* Products: *

Then we test it:

SET TERMINAL/DEVICE=VT102
EDIT HELLO.C

#include "stdio.h"
int main()
{
printf("Hello, OpenVMS CC!");

return (0);
}

[End of file]


$ CC HELLO.C
$ LINK HELLO.OBJ
$ RUN HELLO.EXE
Hello, OpenVMS CC!


C++ is similar, but you need CXX instead of CC.

No comments:

Post a Comment