cpgdemo.o: main: multiply defined; Unresolved: MAIN__The best solution to this is to use the flag
f77command used to link the program (thanks to David Terrett).
LIBS="-lX11"and then rerun makemake.
FFLAGC="-u -O2 -backslash"
__main. The command is
f77 -o cpgdemo cpgdemo.o -L`pwd` -lcpgplot -lpgplot -lX11_sA work-around is to link using
cc -o cpgdemo cpgdemo.o -L`pwd` -lcpgplot -lpgplot -lX11_s -lftn -lm
%LINK-W-MULDEF, symbol DECC$NTOHS multiply defined in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1 %LINK-W-MULDEF, symbol DECC$HTONS multiply defined in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
This driver has problems on VMS. There is a special VMS variant of this driver in the [PGPLOT.DRIVERS] directory. Rename file VTDRIV-VMS.F to VTDRIV.F (replacing the file of that name, which is designed for UNIX), and recompile the library. This driver will accept a device specification of the form "/VT" to display on the terminal, or "file/VT" to create a disk file that you can display with TYPE. The driver still has some problems, however: (1) it is limited to 4 colors, even if your REGIS device can display more; (2) I think the cursor doesn't work on most REGIS devices, although I believe it works on a real VT125 terminal (a rare beast indeed); (3) if you direct output to a file, the driver still thinks the output is an interacrtive device and issues a prompt for each new page. I do not plan to fix any of these problems, as REGIS is now an obsolete graphics language.
If you want your graphics to display in an XTERM window, you should use a device specification "/XTERM" (or possibly "terminal/XTERM" if you have acces to a 'terminal' other than the one you are running the program in. Device type "/TEK", designed for a real Tektronix terminal, does not generate the code required to switch an XTERM into Tektronix mode. You can use /TEK with an XTERM if you first switch the terminal into Tektronix mode by hand, using the control-middle-mouse-button menu.
Device spec "file/TFILE" produces a disk file in Tektronix format. There are two points to note: (1) it does not include the code to switch an XTERM, so you can only display it in an XTERM if the XTERM is already in Tektronix mode. (2) It uses the Tektronix extended (high-resolution) addressing mode, and apparently XTERM doesn't recognize this, so the plot is slightly garbled.
There are many variants of the Tektronix format, and this variety is exacerbated on VMS where you cannot use the same code to write to a terminal as you would use to write a disk file.
I will try to address this problem in a future version of PGPLOT. Basically, I need to modify the I/O routines used by the Tektronix drivers so that they can be used to write a disk file as well as send output to a terminal. This would give you the option of a disk file with any of the Tektronix variants (/TEK, /XTERM, etc.).