| 1 | FORTRAN/TK (v.0.6 beta): |
|---|
| 2 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 3 | |
|---|
| 4 | FORTRAN/TK is, an easy to learn, platform-independent (OS/2 and Windows 32-bit) |
|---|
| 5 | widget toolkit for the Open Watcom FORTRAN 77 compiler. The files "calc.for" |
|---|
| 6 | (Calculator), "edit.for"(Editor) and "example.for"(Simple example) are examples of |
|---|
| 7 | some features already implemented in FORTRAN/TK. They are located in the "examples" |
|---|
| 8 | subdirectory. FORTRAN/TK is based on Rexx/Tk by Roger O'Connor and Mark Hessling. |
|---|
| 9 | (technically it's a kind of wrapper to the Rexx/Tk library) and therefore uses the |
|---|
| 10 | TK-Toolkit from Tcl/Tk. All Rexx/Tk functions are already usable with FORTRAN/TK |
|---|
| 11 | including some which are not even listed in the Rexx/Tk help. However FORTRAN/TK |
|---|
| 12 | does not need a Rexx-Interpreter. |
|---|
| 13 | It also includes about 20 new functions which are neither part of Tcl/Tk nor Rexx/Tk |
|---|
| 14 | nor Open Watcom FORTRAN. They include functions for file management, file searching, |
|---|
| 15 | basic support for dynamic DLL handling and the clipboard which are commonly needed. |
|---|
| 16 | |
|---|
| 17 | How to build FORTRAN/TK: |
|---|
| 18 | FORTRAN/TK is built as a library of different object files, which you can easily |
|---|
| 19 | include in your project. |
|---|
| 20 | |
|---|
| 21 | FORTRAN/TK and its examples can be compiled using the provided makefiles. |
|---|
| 22 | To compile FOTRAN/TK, go to the commandline, set the environment variables of |
|---|
| 23 | Open Watcom and issue the following in the FORTRAN/TK directory: |
|---|
| 24 | wmake [os=OS2|WIN] |
|---|
| 25 | "os=WIN" compiles the library for Windows 32-bit. If "os=OS2" or "os" is |
|---|
| 26 | omitted, the library will be compiled for OS/2 32-bit. |
|---|
| 27 | |
|---|
| 28 | A file called "fortrantk.lib" will be created. |
|---|
| 29 | Remember that the library includes platform dependent code and must be rebuilt to |
|---|
| 30 | work on another system as compiled for. |
|---|
| 31 | |
|---|
| 32 | How to build the examples: |
|---|
| 33 | Copy the prievously built "fortrantk.lib" to the "examples" subdirectory. |
|---|
| 34 | Remember that the FORTRAN/TK directory should be somewhere in the FORTRAN include |
|---|
| 35 | path (e.g. defined with the FINCLUDE environment variable in your "setvars.cmd"/ |
|---|
| 36 | "setvars.bat" or "config.sys"/"autoexec.bat") because FORTRAN/TK programs share |
|---|
| 37 | some include files with the core itself. |
|---|
| 38 | |
|---|
| 39 | Then issue: |
|---|
| 40 | wmake [ico16=|ico=] [os=OS2|WIN] [calc=] [edit=] [example=] |
|---|
| 41 | If everything is omitted, all examples will be built for OS/2 without icons. |
|---|
| 42 | Specify "os=WIN" to compile the examples for Windows. If you set either |
|---|
| 43 | "calc=", "edit=" or "example=" then just these examples will be compiled. |
|---|
| 44 | If "ico=" or "ico16=" is set, the standard FORTRAN/TK icon will be included |
|---|
| 45 | in the file, whereas "ico16=" is for OS/2 only and says that the 16-bit |
|---|
| 46 | resource compiler should be used instead of the 32-bit one (I had problems with |
|---|
| 47 | it). Under OS/2, the resource compilers of the OS/2 Developers Toolkit are used, |
|---|
| 48 | so be sure that you have installed them. |
|---|
| 49 | So to compile all examples for OS/2 and include the icon, you would have to enter: |
|---|
| 50 | wmake ico= |
|---|
| 51 | or |
|---|
| 52 | wmake ico= os=WIN |
|---|
| 53 | for Windows. |
|---|
| 54 | |
|---|
| 55 | Basically, a FORTRAN/TK program can be built by issuing the Open Watcom FORTRAN |
|---|
| 56 | Compile and Link Utility in the following way: |
|---|
| 57 | |
|---|
| 58 | wfl386 [yourprogram.for] -"f fortrantk.lib" -FE=[yourprogram.exe] -BM -DEF=[OSDEF] -L=[SYSTEM] |
|---|
| 59 | |
|---|
| 60 | where [yourprogram.for] is your program, [yourprogram.exe] is the executable name |
|---|
| 61 | of your program, [OSDEF] is a compiler definition - either __OS2__ or __WIN__ and |
|---|
| 62 | [SYSTEM] is the system identifier for the linker, which should be either OS2V2, |
|---|
| 63 | OS2V2_PM (without console, windowed application), NT or NT_WIN (without console). |
|---|
| 64 | |
|---|
| 65 | Required libraries: |
|---|
| 66 | OS/2: "rexxtk.dll", "rexxtran.dll", "tcl80.dll", "tk80.dll", EMX libraries (for Tcl/Tk). |
|---|
| 67 | They must be somewhere in the PATH or in the directory defined by the TKINIT-function of your |
|---|
| 68 | program. |
|---|
| 69 | These files are already located in the "examples\binos2\runtime" directory of |
|---|
| 70 | FORTRAN/TK. |
|---|
| 71 | |
|---|
| 72 | Windows: "Msvcrt.dll", "rexxtk.dll", "rexxtrans.dll", "tcl80.dll", "tk80.dll" |
|---|
| 73 | (should be in the directory defined by the TKINIT-function of your program). |
|---|
| 74 | You may also need the Tcl/Tk libraries - the "lib" directory must be |
|---|
| 75 | one level deeper than the Tcl/Tk-DLLs (../), but you may change this |
|---|
| 76 | by the TCL_LIBRARY and TK_LIBRARY environment variables. |
|---|
| 77 | These files are already located in the "examples\binwin\runtime" directory of |
|---|
| 78 | FORTRAN/TK. |
|---|
| 79 | |
|---|
| 80 | Documentation: |
|---|
| 81 | Sadly, there is no real documentation yet except the example programs, the |
|---|
| 82 | source code (which needs some more documentation, too) and this readme file. |
|---|
| 83 | The FORTRAN/TK-Api is very similar to the Rexx/Tk library, so the Rexx/Tk help |
|---|
| 84 | (http://rexxtk.sourceforge.net/) will also be useful. |
|---|
| 85 | But the Rexx/Tk documentation isn't complete, too, so you should read the Tcl/Tk |
|---|
| 86 | help of your installed release anyway. |
|---|
| 87 | |
|---|
| 88 | FORTRAN/TK is an Open Source project, so you are invited to participate in the |
|---|
| 89 | development, to study the sourcecode, to send bug fixes and to modify the |
|---|
| 90 | sourcecode in all ways allowed by the OSL v.2.1 license. |
|---|
| 91 | I am happy about any suggestion and help. |
|---|
| 92 | |
|---|
| 93 | Copyright (C): 2005 Robin Haberkorn |
|---|
| 94 | License: Open Software License v.2.1 |
|---|
| 95 | (look at "osl-2.1.txt" for a text copy) |
|---|
| 96 | |
|---|
| 97 | FORTRAN/TK may still contain serious bugs. |
|---|
| 98 | It is distributed WITHOUT ANY WARRANTY! |
|---|
| 99 | |
|---|
| 100 | Detailed documentation coming soon... |
|---|
| 101 | |
|---|
| 102 | Contact: None-Brain@web.de |
|---|
| 103 | FORTRAN/TK Homepage: http://qdlos.sourceforge.net/fortrantk |
|---|