Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] Problems setting up Photran with g95 under WinXP

 
On Thursday, October 25, 2007, at 12:10PM, "Doug Cox" <tcc@xxxxxxxxxx> wrote:
>
>On Thu, 2007-10-25 at 16:40 +0200, Sebastian Hölz wrote:
>...
>
>> So, where is the problem?
>> =========================
>> ..., but in the "Toolchain" the MinGW G95-compiler is not in the selection list and I'm stuck!
>> 
>> Right now, I have no idea how to proceed and I would surely appreciate any help.
>
>It may be a bit outdated, but you could try looking at:
>
>http://g95.org/howto.html#photran
>
>Doug


Hi

We are using Photran in our Software Engineering class in UIUC. We are having our students write possible plug-ins for Photran based on the list <http://www.eclipse.org/photran/newcontributors.php> for new contributors.

These are the instructions that I gave the students for getting a Fortran Project to work. I have tested this on the version in the CVS which was pre-beta2 but I think it will work on the current Beta2 version as well -- I don't have the time at the moment to test this out now on the recently released version.
Setup Photran (assuming that you have installed g95 properly either using Cygwin or MingW)

1. I assume that you have gotten Photran to compile without any errors. If not, make sure that it works first before continuing.
2. Make sure that the location of the workspace does not contain spaces (see Photran FAQ)
3. In the Photran instance, select the Fortran Perspective from Window > Open Perspective > Other
4. Create a new Fortran Project by going to File > New > Fortran Project
5. Call the project Hello as our example.
6. Select Executable (Gnu Fortran).
7. Uncheck Show project types and toolchains only if they are supported on the platform
8. Select the previously hidden GCC Tool Chain option. You must select it or you will not be able to continue.
9. Click Next >
10. Click on the Advanced settings.. button
11. Go to C/C++ Build > Settings. Open the Binary parsers tab.
12. Deselect Elf Parser and select PE Windows Parser. Also, move it up to the first position.
13. You can do the same for the Release setting (from the drop-down menu).
14. Click OK in that window.
15. Click Finish.
16. Right-click on the Hello project folder and select New > Source File
17. Call the file hello.f90.
18. Type the following lines and save that file
program hello
    print *, "Hello World"
    stop
end program hello
19. Select Project > Build All
20. On the Binaries folder in the Fortran Project tab, select Hello.exe. Right-click and select Run As > Local C/C++ Application.
21. Select Cygwin gdb debugger in the pop-up dialog and click OK.
22. You should see Hello World printed in the console.



--
Nicholas Chen





Back to the top