How to build GrWin/PGPLOT executables


The following is obsoleted and left for reference only. The latest version of GrWin is available here.


For each of supported compiler systems a set of sample batch files is included in the corresponding distribution as mentioned in Distribution. The names, with omitted the extensions .bat's, of those sample batch files for each distribution is shown in the next table, where the symbol '(w)' stands for that the GUI counterpart of a batch file for a console window (CUI) is available with its filename followed by 'w', e.g., gwgccw for gwgcc.

Sample batch file names for the supported compiler systems
Supported compiler system FORTRAN C C++ PGPLOT CPGPLOT
MinGW-2.0 gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
Cygnus Cygwin 1.3.x gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
Open Watcom C/C++ and Fortran 1.0 gwwfl gwwcl(w)
pggwwfl pggwwcl(w)
Borland C++ Compiler 5.5 + f2c gwf2bcc gwbcc(w)
pggwf2bcc pggwbcc(w)
Digital Mars C/C++ Compilers + f2c gwf2dmc gwdmc(w)
pggwf2dmc pggwdmc(w)
Intel(R) C++/Fortran Compiler 7.1 ( f2c available ) gwifl gwicl(w)
pggwifl pggwicl(w)
Microsoft Visual C++ Version 6.0 + f2c gwf2cl gwcl(w)
pggwf2cl pggwcl(w)
Compaq Visual Fortran Version 6 gwdf gwcl(w)
pggwdf pggwcl(w)
gcc-2.95.2-mingw32 gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
gcc-2.95.2-mingw32 gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
gcc-2.95.2-cygb20 gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
AT&T UWIN 3.x + gcc-2.95.2-uwin gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)

It should be noted in using these batch files that extensions .f for Fortran, .c for C or .cpp for C++ should be omitted as only the first argument. For example, to get an executable abc.exe from abc.f and xyz.c using g77, the GNU Fortran, you can do as follows:

gwf77 abc xyz.c

Similarly to get aaa.exe from aaa.c using gcc, the GNU C, and bbb.exe from bbb.cpp using g++, the GNU C++, you can do as follows:

gwgcc aaa
gwgccw bbb

To make a console application (CUI) from source code, the following option should be added in linking using gcc or g77 on MinGW-2.0, Cygnus Cygwin 1.3.x, AT&T UWIN 3.x and GCC Development Toolchain for x86-win32 targets:

-Wl,--subsystem,console -lGrWin -mwindows

You can see similar lines in the sample batch files gwf77.bat and gwgcc.bat. To make a Windows application (GUI) using gcc or g77 the option 'console' should be replaced with 'windows' as

-Wl,--subsystem,windows -lGrWin -mwindows

and gwgccw.bat includes a similar line.

To make CUI and GUI executables using other compiler systems, say VC++, refer the command lines in the corresponding batch files, e.g., gwcl.bat and gwclw.bat, respectively, for VC++.

In the subfolders demo and pgplot in the GrWin folder, various pieces of source code are available as examples. To make all executables to the source files in those directories using a compiler based on GNU, i.e., MinGW-2.0, Cygnus Cygwin 1.3.x, AT&T UWIN 3.x or GCC Development Toolchain for x86-win32 targets, input simply

make

or, in the demo folder

nmake -f make.mak

for VC++/VF.

Before running any executable it is recommended to see the description about grwnd.exe.



Tsuguhiro TAMARIBUCHI <tamari@grwin.com>

Last modified:  Thu Jun 26 22:22:53 JST 2003