| <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop' |
| |
| $pageTitle = "Documentation for Photran"; |
| $pageKeywords = "photran, contributors, developers"; |
| $pageAuthor = "Jeffrey Overbey"; |
| |
| # Paste your HTML content between the EOHTML markers! |
| $html = <<<EOHTML |
| |
| <div id="maincontent"> |
| <div id="midcolumn"> |
| <h1>$pageTitle</h1> |
| |
| <div class="homeitem3col"> |
| <h3>Documentation?</h3> |
| <p>Unfortunately, |
| there is no real documentation for |
| Photran at this |
| time. Documentation is an excellent way to contribute to |
| Photran; |
| if you are interested in this, please contact us.<br> |
| <br> |
| That said, Photran is highly based on the CDT, and therefore, the <a |
| href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt-home/user/C_C++_Development_Toolkit_User_Guide.pdf?cvsroot=Tools_Project">CDT |
| User's Guide</a> translates almost directly into documentation for |
| Photran (although there are a few features the CDT has that Photran |
| does not). If you are not sure how a part of Photran works, try |
| looking there; if you're still not sure, join the <a |
| href="mailinglists.php">Photran mailing list</a> and |
| post your question there.</p> |
| |
| <h4>On this page...</h4> |
| <ol> |
| <li><a href="#mm">Getting Started with Managed Make</a></li> |
| <li><a href="#sm">Getting Started with Standard Make</a></li> |
| </ol> |
| |
| <h4>Elsewhere on the Photran site...</h4> |
| <ol> |
| <li><a href="refactoring.php">Overview of Refactoring Support</a></li> |
| </ol> |
| |
| <h4>Elsewhere on the Web...</h4> |
| <ol> |
| <li><a href="http://g95.sourceforge.net/howto.html#photran">How to use Photran with g95</a> |
| (<a href="http://vinyl2.sentex.ca/~tcc/g95/How_to_use_Photran_with_g95.html">alternate link</a>)</li> |
| <!--li><a href="http://vinyl2.sentex.ca/~tcc/g95/How_to_use_mkmf_with_g95.html">How to use mkmf with g95</a></li--> |
| <li><a href="ftp://ftp.swcp.com/pub/walt/F/photran.pdf">Photran Tutorial</a> from the <a href="http://www.fortran.com">F Tools</a> suite (slightly outdated)</li> |
| </ol> |
| </div> |
| |
| <div class="homeitem3col"> |
| <a name="mm"></a><h3>Getting Started with Managed Make</h3> |
| <p>If your system has the GNU gfortran compiler installed, try this.</p> |
| <ol> |
| <li>File | New | Fortran Project </li> |
| <li>Call it whatever</li> |
| <li>Choose the Executable (Gnu Fortran) from the project type list</li> |
| <li>Choose GCC Toolchain from the toolchain list (you may need to uncheck |
| the "Show project types..." check box at the bottom of the |
| window) |
| <li>Click Next</li> |
| <li>Click on Advanced Settings</li> |
| <li>Expand C/C++ Build in the list on the left, and click on Settings</li> |
| <li>Click on the Binary Parsers tab. Check the appropriate |
| parsers for your platform. If you are using Windows, check |
| PE Windows Parser and/or Cygwin PE Parser; if you are using Linux, |
| check Elf Parser; if you are using Mac, check Mach-O parser.</li> |
| <li>Click on the Error Parsers tab. Check the error parser(s) for the |
| Fortran compiler(s) you will use.</li> |
| <li>Click OK</li> |
| <li>Click Finish</li> |
| <li>Click File | New | Source File </li> |
| <li>Call it hello.f90; click Finish</li> |
| <li>Type the standard "Hello, World" program, and click |
| File | Save.<br> |
| <br> |
| <samp>program hello<br> |
| print *, "Hello World"<br> |
| stop<br> |
| end program hello<br> |
| </samp><br> |
| </li> |
| <li>Open the Console view, and make sure "make" ran OK |
| and compiled your program </li> |
| <li>In the Fortran Projects view, expand the Binaries |
| entry, and click on your |
| executable (e.g., "whatever - [x86le]") </li> |
| <li>Run | Run As | Run Local C/C++ Application (yeah, I |
| know, it should say "Fortran Application", but it doesn't) </li> |
| <li>Choose GDB Debugger (Cygwin GDB Debugger if you're |
| under Windows) </li> |
| <li>Check the Console view, and make sure Hello World appeared.</li> |
| </ol> |
| </div> |
| |
| <div class="homeitem3col"> |
| <a name="sm"></a><h3>Getting Started with Standard Make</h3> |
| <p>To get started, try this. If you're under Windows, you need |
| to be running Cygwin, c:\cygwin\bin and c:\cygwin\usr\bin should be in |
| your system path, and the g95 libraries need to be copied into /usr/lib |
| (to make things easier for yourself, at least).</p> |
| <ol> |
| <li>File | New | Fortran Project </li> |
| <li>Call it whatever</li> |
| <li>Expand "Makefile project" in the project type list (it has a folder icon), |
| and choose Empty Project</li> |
| <li>Make sure "-- Other Toolchain --" is selected in the |
| toolchain list in the right-hand column, and |
| click Next</li> |
| <li>Click on Advanced Settings</li> |
| <li>Expand C/C++ Build in the list on the left, and click on Settings</li> |
| <li>Click on the Binary Parsers tab. Check the appropriate |
| parsers for your platform. If you are using Windows, check |
| PE Windows Parser and/or Cygwin PE Parser; if you are using Linux, |
| check Elf Parser; if you are using Mac, check Mach-O parser.</li> |
| <li>Click on the Error Parsers tab. Check the error parser(s) for the |
| Fortran compiler(s) you will use.</li> |
| <li>Click OK</li--> |
| <li>Click Finish</li> |
| <li>File | New | File </li> |
| <li>Call it Makefile </li> |
| <li>Click Finish </li> |
| <li>We assume you're familiar with how to format a |
| Makefile. Something like this will work for now. |
| Remember |
| to start the g95 line with a tab, not spaces. The -g switch |
| instructs g95 to include debugging symbols in the generated executable |
| so that it can be debugged later.<br> |
| <br> |
| <samp>all:<br> |
| g95 -g hello.f90<br> |
| <br> |
| clean:<br> |
| <br> |
| </samp><br> |
| </li> |
| <li>File | New | Source File </li> |
| <li>Call it hello.f90 </li> |
| <li>Click Finish </li> |
| <li>Type the standard "Hello, World" program.<br> |
| <br> |
| <samp>program hello<br> |
| print *, "Hello World"<br> |
| stop<br> |
| end program hello<br> |
| </samp><br> |
| </li> |
| <li>Project | Clean; then click OK </li> |
| <li>Open the Console view, and make sure "make" ran OK |
| and compiled your program </li> |
| <li>In the Fortran Projects view, expand the Binaries |
| entry, and click on your |
| executable (e.g., "whatever - [x86le]") </li> |
| <li>Run | Run As | Run Local C/C++ Application (yeah, I |
| know, it should say "Fortran Application", but it doesn't) </li> |
| <li>Choose GDB Debugger (Cygwin GDB Debugger if you're |
| under Windows) </li> |
| <li>Check the Console view, and make sure Hello World appeared.</li> |
| </ol> |
| </div> |
| |
| </div> |
| </div> |
| EOHTML; |
| |
| # Generate the web page |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| ?> |