gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
1568 Posts in 518 Topics by 754 Members - Latest Member: irekzawadzki December 03, 2021, 08:54:54 AM
*
gfx* Home | Help | Search | Login | Register | gfx
gfx
Absoft User Forum  |  Support  |  Building and Using Additional Software & Libraries  |  Building PGPLOT 5.2 Graphics Library on Windows
gfx
gfxgfx
 

Author Topic: Building PGPLOT 5.2 Graphics Library on Windows  (Read 7106 times)

forumadmin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 321
Building PGPLOT 5.2 Graphics Library on Windows
« on: May 27, 2010, 02:31:49 PM »
This post provides instructions on building PGPLOT with Absoft Pro Fortran 11.0 and later for 32 or 64 bit Microsoft Windows.

The PGPLOT Graphics Subroutine Library is a Fortran- or C-callable, device-independent graphics package for making simple scientific graphs. It is intended for making graphical images of publication quality with minimum effort on the part of the user. For most applications, the program can be device-independent, and the output can be directed to the appropriate device at run time.


Note: if you are using a later version of Absoft Pro Fortran, replace the references to the Absoft11.0 directory
with the directory appropriate for your version.

DOWNLOADING THE REQUIRED PACKAGES

Full documentation and the primary source package required to build PGPLOT can be obtained here http://www.astro.caltech.edu/~tjp/pgplot/

An additional package with Absoft specific additions can be obtained here http://www.absoft.com/electronicdelivery/library/absoft11_pgplot52_additions.zip

After unpacking the full PGPLOT source, copy the entire directory named sys_absoftwindows from the Absoft specific additions into the top level PGPLOT directory.

The instructions below assume that you have placed the full PGPLOT source directory into C:\Absoft11.0 and that the full path to the Absoft specific files is C:\Absoft11.0\pgplot\sys_absoftwindows. If your top level PGPLOT directory is in another location, replace C:\Absoft11.0 with that location.

INCLUDED DRIVERS

The following drivers are included in the PGPLOT library produced by the instructions in this post:

/NULL to plot onto the null device
/WINDOWS to plot onto a color Win32 output window
/PS    to produce a file that can be printed on a Postscript printer
/VPS   to produce a 'vertical' or portrait mode Postscript file
/CPS   to produce a file that can be printed on a color Postscript printer
/VCPS  to produce a 'vertical' or portrait mode color Postscript file
/GIF   to produce a Graphics Interchange Format file (.gif), landscape orientation
/VGIF  to produce a Graphics Interchange Format file (.gif), portrait orientation


BUILDING THE LIBRARY

Building the PGPLOT library requires either Microsoft Visual Studio 2005 or Microsoft Visual Studio 2008. A no cost version of this product called Visual Studio Express is available from the Microsoft Website.

Building from the Absoft Development Command Prompt

 1) Launch a Development Command Prompt window from the Absoft Pro
     Fortran menu located in the Windows Start Menu.

 2) Enter
      cd C:\Absoft11.0\pgplot\sys_absoftwindows

 3) If you have Visual Studio 2005 installed, enter

        make_VC2005_32.bat
        make_VC2005_64.bat

    If you have Visual Studio 2008 installed, enter

        make_VC2008_32.bat
        make_VC2008_64.bat

    Note: you will need to edit these .bat files if you are running
    on a 64 bit version of Windows. Simply replace "Program Files" with
    "Program Files (x86)" in the path to the Visual Studio environment
    script vcvarsall.bat.

  4) After building the libraries, you can install them into your ABSOFT
     directory by entering

        amake2 -f makefile32.amake2 install
        amake2 -f makefile64.amake2 install

Building from the Absoft Tools Integrated Development Environment

   1) Launch the Development Tools Interface from the Absoft Pro Fortran menu
      located in the Windows Start Menu.

   2) Open the AbsoftTools project file named PGPLOT_LIBRARIES.atools located
      in C:\Absoft11.0\pgplot\sys_absoftwindows.

   3) Set the Active Build to the library you wish to build

       a. Release32_VC2005 - 32 bit library with Visual Studio 2005
       b. Release64_VC2005 - 64 bit library with Visual Studio 2005
       c. Release32_VC2008 - 32 bit library with Visual Studio 2008
       c. Release64_VC2008 - 64 bit library with Visual Studio 2008

   4) Choose Build from the AbsoftTools Build Menu (or use Ctrl+B from
      the keyboard) to build the selected library

   5) After building the libraries, you can install them into your
      ABSOFT directory by following step 4 in the previous section titled
      "Building from the Absoft Development Command Prompt"

PGPLOT ENVIRONMENT VARIABLES

The default location for the PGPLOT font file GRFONT.DAT is C:\PLPLOT. The library will also look in your ABSOFT lib directory for this file. You can override the location of the FONT library at run time by setting an environment variable. For example,

SET PGPLOT_FONT=C:\LIB

would cause PGPLOT to look in the C:\LIB directory for the GRFONT.DAT file.

BUILDING THE DEMO PROGRAMS

An AbsoftTools project and makefiles for building the PGPLOT demos as 32 and 64 bit executables are located in the directory C:\ABSOFT11.0\pgplot\sys_absoftwindows\examples.

To build the demos from the Absoft Development Command Prompt

  1) Launch a Development Command Prompt window from the Absoft Pro
     Fortran menu located in the Windows Start Menu.

  2) Enter
      cd C:\Absoft11.0\pgplot\sys_absoftwindows\examples

  3) Build the 32 bit demos by entering
       amake2 -f makefile32.amake2

     Build the 64 bit demos by entering
       amake2 -f makefile64.amake2

To build the demos from the Absoft Tools Integrated Development Environment

   1) Launch the Development Tools Interface from the Absoft Pro Fortran menu
      located in the Windows Start Menu.

   2) Open the AbsoftTools project file named PGPLOT_EXAMPLES.atools located
      in C:\Absoft11.0\pgplot\sys_absoftwindows\examples.

   3) Set the Active Build to Release32 to build the 32 bit demos or
      to Release64 to build the 64 bit demos.

   4) Choose Build from the AbsoftTools Build Menu (or use Ctrl+B from
      the keyboard)

LINKING WITH THE PGPLOT LIBRARY

Linking your code with the PGPLOT library requires the PGPLOT library itself (pgplot.lib), two Windows API libraries (gdi32.lib and user32.lib), and the Absoft Unix Compatibility library (unix.lib). A 32 bit program requires the 32 bit versions of these libraries and a 64 bit program requires the 64 bit versions of these libraries.

If you have executed the make install commands in the section above titled "BUILDING THE LIBRARY", you can compile and link a single source file which uses the PGPLOT library as follows:

    af77 -unixlib file.f pgplot.lib gdi32.lib user32.lib

  or

    af77 -m64 -unixlib file.f pgplot.lib gdi32.lib user32.lib

If you did not install the PGPLOT library into your ABSOFT directory, you will need to specify the full path to the 32 or 64 bit pgplot.lib file.
« Last Edit: March 26, 2013, 07:04:50 AM by forumadmin »

Absoft User Forum  |  Support  |  Building and Using Additional Software & Libraries  |  Building PGPLOT 5.2 Graphics Library on Windows
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!