1

Kind all,

I've received a very messy fortran program which I'm tried to debug: in order to do that I would like to use the debugging features of a IDE to ease the process, an IDE such as Eclipse Photran

The program is made by multiple .f90 files (and other auxiliary files that it reads at runtime) with an associated makefile.

I've created an empty makefile fortran project, copied the original folders and files in the new Photran workspace and now I'm trying to build the executable via the existing makefile to proceed with debug, but I'm failing at it.

I do not understand how to create a make target so that Photran does the same thing as typing into the console "make makefile", can somebody help on this?

Thanks

Mutewinter
  • 241
  • 1
  • 12

1 Answers1

1

Found how!

I find the "make targets" function of Eclipse quite confusing, but still, here's what I've done:

  1. create a new make target in the folder where the makefile resides, give it any name under "Target Name" (it's just for Eclipse's purposes)

  2. untick the box "same as the target name" and remove all characters from the textbox. It has to be empty

  3. insert whatever make command/flag you want into the "use builder settings" or leave it as is

  4. double click on the newly created target, Eclipse should automatically invoke make and find your makefile. This should build your program.

Maybe it's basic, but for a newbie like me it was not clear, therefore I'll leave the answer here for any other "noob" stumbling on this problem.

Mutewinter
  • 241
  • 1
  • 12
  • I couldn't get this to work at first, possibly because some of the menu names are different (maybe I'm using a later version of Photran - I'm on 4.7.3a). Anyway, the key point is that the project must be a "Makefile Project with Existing Code" which confusingly is under the "C/C++" part of the new project tree. This is OK, even if it's a Fortran project. NB: There is no equivalent option under the Fortran part of the project tree and you cannot have a straight "Fortran project" or Photran just uses automatic build commands. – Biggsy May 10 '18 at 09:54