Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
PTP/photran/documentation/photran5
You are here: PTP > Photran > Documentation > Photran 5.0 User's Guide
Photran 5.0 User's Guide
IMPORTANT: For the time being, this is just an outline of the
documentation we intend to write before the release of Photran 5.0
in September, 2009. It is not useful yet. Of course, you are
welcome to fill in any sections you wish... this is a wiki!
Contents
Installing Photran
System Requirements
To install Photran 5.0,
- you must have Eclipse 3.5 (Galileo) installed,
- you must have the C/C++ Development Tools (CDT) 6.0 installed,
- Eclipse must be running on a Java 1.5 or later JVM (to get reasonable performance, we recommend Sun [1] or IBM's [2] JVM), and
- if you want to compile and build Fortran applications, you must have a make utility and a Fortran compiler in your system path. Many Linux/Unix systems include these; details on installing them in Windows are below.
Installation Procedure
To install Photran, start Eclipse, then...
- Download the latest Photran zip file from [3]
- Click on Help > Software Updates...
- Click on the "Available Software" tab
- Click on "Add Site..."
- Click Archive...
- Choose the zip file you downloaded from [4]
- Click OK to close the Add Site dialog
- The zip file should appear in the list as jar:file:/path/to/photran-master-4.0.5-something. Expand it.
- Expand "Photran (Eclipse Fortran Development Tools)" and check the box next to "Photran (Eclipse Fortran Development Tools) (Eclipse Technology Incubation)"
- If you have Intel Fortran installed on Linux or IBM XLF installed on Mac, then expand "Photran Compiler Support" and select the appropriate compiler as well.
- Click on the "Install..." button in the upper-right corner of the dialog box.
Additional Instructions for Windows Users
To compile and run Fortran programs in Photran, you will need to have a Fortran compiler and make utility installed. Most Linux/Unix distributions include these; [[5]] is commonly used (and free). Under Windows, you will need to install Cygwin [6] or MinGW [7] and put them on your Windows PATH. Detailed instructions for Cygwin follow.
- Install Cygwin [8]; the defaults are mostly OK, but you will need to explicitly tell it to include the "Devel" packages (at least gcc4-fortran, gdb, and make) when the installer asks you to select what packages to install
- Add the Cygwin directories to your Windows PATH. Under Windows XP, the process is as follows:
- Make sure you are logged in under an administrator account.
- Open the Control Panel.
- Double-click the System icon.
- Switch to the Advanced tab.
- Click the Environment Variables button.
- Under System Variables, find the variable "Path" in the list, and click on it.
- Click Edit.
- At the end of the "Variable Value" text, add
;C:\Cygwin\bin;C:\Cygwin\usr\bin;C:\Cygwin\usr\local\bin;C:\Cygwin\lib;C:\Cygwin\usr\lib
- Click OK, click OK, click OK, and close the Control Panel.
- Close and re-open Photran. Windows should now search C:\Cygwin\bin, C:\Cygwin\usr\bin, etc. when it's looking for executables (including make.exe, gcc.exe, and gfortran.exe).
Additional Instructions for Mac OS X Users
If you install gfortran on Mac OS X, it may be installed in /usr/local/bin, which is not (by default) on the PATH. If you are launching Eclipse from a Terminal, the PATH can be set by modifying /etc/paths. However, if you are launching Eclipse from the Finder (by double clicking on it) or the Dock, then the PATH is not obtained from the shell or /etc/paths. Instead, it's obtained from ~/.MacOSX/environment.plist. The format of the environment.plist file is as follows (change the path appropriately). If you create or edit this file, you will need to log out (or reboot) before the changes will take effect.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PATH</key> <string>/usr/local/mpi/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/sbin:/usr/sbin:/Developer/Tools:/usr/texbin:/Users/greg/bin</string> </dict> </plist>
Starting a New Project
TODO
Managed Make
TODO
Standard Make
TODO
Writing Code
TODO
- The Fortran Perspective
- The Fortran Projects View
- Using the Fortran editor and Fortran perspective
- Selecting free vs. fixed form; watermark indicating content type mismatch
- Outline view - note Source Form marker in top, skull & crossbones
- Overview of the Fortran editors (incl. rulers, folding, smart highlighting)
- Comment/uncomment
- Setting bookmarks
- Go to line (Ctrl+L)
- Configuring the editor
- Selecting horizontal ruler vs. folding
- Setting colors for syntax highlighting
- Showing print margin
- Spaces instead of tabs
- Show whitespace
- Set font
- Show line numbers
Compiling Fortran Programs
TODO
- refer to CDT
- Setting make targets - refer to CDT
- Error parsers
- Binary parsers - need to change if no "Run as Local Fortran App" menu item
Running and Debugging Fortran Programs
TODO
- refer to CDT
- Setting breakpoints
- Note compiler-specific problems
Advanced Features
TODO - reference Advanced Features guide
Troubleshooting
TODO
- FAQ
- Mailing list
Beyond Photran
TODO
- Using Photran with other Eclipse plug-ins
- Subversion support
- PTP/RDT
- RSE