To compile a project, Photran generally executes whatever make command is on your system path. (On most systems, this will invoke GNU Make.) As noted above, when you create a project, you can decide if Photran will auto-generate a Makefile that uses GNU Fortran, Intel Fortran, or IBM XL Fortran, or you can elect to hand-write your own Makefile.

- To use an automatically generated Makefile, choose "Executable (Gnu Fortran on XYZ)" from the Project type menu, where XYZ is your platform (Windows, Linux, or Mac OS X). There are similar options available for Intel Fortran and IBM XL Fortran.
- To create a project using a custom Makefile, in the project type selection box, expand the Makefile Project folder, and select Empty Project.

# Building Projects

Compiling Fortran projects is identical to compiling C/C++ Projects. For more information on building projects, click on Help > Help Contents in Eclipse, and navigate to C/C++ Development User Guide > Concepts > Build > Building C/C++ Projects.

# Setting Make Targets

Setting make targets for Fortran programs is also identical to setting make targets for C/C++ programs. For more information on make targets, click on Help > Help Contents in Eclipse, and navigate to C/C++ Development User Guide > Tasks > Building projects > Creating a make target.

# Marking Error Messages from Your Fortran Compiler (Error Parsers)

When you build (compile) your Fortran program, the output from your Fortran compiler (including any error messages) will be displayed in the Console view. However, for many compilers, Photran can "recognize" error messages, placing the problem description in the Problems view and marking the corresponding line in the source file with a red X icon. To do this, you must have the correct error parsers selected in your Fortran project's build settings. To modify these settings, right-click on your Fortran project, go to Properties > Fortran Build > Settings and select the Error Parsers tab. A list of error parsers is displayed; select the one(s) corresponding to the Fortran compiler(s) you are using and click OK.

# Recognizing Executables (Binary Parsers)

In order to run (execute) your Fortran application, you will need to tell Eclipse which Binary Parser(s) to use for your project. This can be done in the project properties (Right-click project > Properties > Fortran Build > Settings > Binary Parsers Tab). Which binary parser you want to use will depend on the operating system environment you are working in. For example, the default choice is the Elf Parser which is for Linux environments. Windows users would need to deselect the Elf Parser and select the PE Windows Parser and/or the Cygwin PE Parser. Mac users should choose the Mach-O parser.