These example programs are primarily intended for someone learning how to code using the VOGLE library.
Assuming you got the precompiled library Linux.tgz and expanded it in $HOME/VOGLE/ using something like
cd mkdir VOGLE mv Linux.tgz VOGLE/ cd VOGLE tar xvfz Linux.tgz
Many of the pre-compiled libraries were built before the Fortran interface was changed to use the ISO_C_BINDING interface. For these older versions you would remove the "use M_vogle" line from the Fortran examples and replace this with an INCLUDE of "interface.h", which is the FORTRAN 77 equivalent of
integer,external :: backbuffer integer,external :: checkkey integer,external :: getdepth integer,external :: getkey integer,external :: locator external scale integer,external :: slocator
You would then compile and load an example Fortran program with something like
gfortran -L$HOME/VOGLE/Linux -lvogle -lX11 example.f -o example
cc -L$HOME/VOGLE/Linux -lvogle -lX11 example.c -o example
for C programs.
Before executing the program you would have to set up your environment with something like
export VDEVICE=X11 # select a default output device export VFONTLIB=$HOME/VOGLE/Linux/hershey # point to hershey font directory
as described in the user manual. Then just execute your program:
./example
Details vary depending on what compiler you have, what system you are on, and what shell you are using.
The ccall(1) command in the script directory can be used to load and compile the FORTRAN 77 and C examples on various platforms.
Add the VOGLE distribution script directory and the appropriate distribution bin directory in your search path. Assuming you expanded the libs.tgz file in $HOME/VOGLE/libs and are using a Bourne-family(sh,ksh88,bash,ash,...) shell, and have built the VOGLE libraries using the "scripts/make.shell" script ...
PATH=$PATH:$HOME/VOGLE/libs/scripts PATH=$PATH:$HOME/VOGLE/libs/bin/`systemtype r` PATH=$PATH:$HOME/VOGLE/libs/bin/`systemtype r`/EXAMPLES PATH=$PATH:$HOME/VOGLE/libs/bin/`systemtype r`/TESTS export PATH
Set the VFONTLIB and VDEVICE variables as described in the VOGLE user guide:
export VDEVICE=x11 export VFONTLIB=$HOME/VOGLE/libs/`systemtype r`/hershey
Now cd to the C, F90, CC or P sub-directories and enter a ccall(1) command:
cd F90 ccall trivial.f90 #(csh/tcsh users should do a 'rehash") trivial
If that works, you should be able to compile, load, and execute any of the example programs.
If you are developing a new output device driver note that these example programs are very useful for testing new drivers. For new device drivers the trivial.{c,f90} file is of most use, followed by views.{c,f90}, and then poly.{c,f90}. When those three work, try the others. loc.{c,f90} can be used for testing the mouse device if you are developing an interface device driver.
From the point of view of learning how to use VOGLE the suggested reading order is below.
teapot.c, beer.c, and showg.c are provided for general interest, but are not for a new user.
If you are using SUNVIEW or an X11 toolkit, there are additional examples in the directories sunview, xview and xt in the original distribution file.