Photran:使用现有的makefile进行构建 [英] Photran: building with an existing makefile

查看:101
本文介绍了Photran:使用现有的makefile进行构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部保留

我收到了一个非常混乱的fortran程序,试图对其进行调试:为此,我想使用IDE的调试功能来简化此过程,例如Eclipse Photran之类的IDE

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

该程序由多个.f90文件(以及运行时读取的其他辅助文件)以及关联的makefile组成.

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

我创建了一个空的makefile fortran项目,在新的Photran工作区中复制了原始文件夹和文件,现在我试图通过现有的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.

我不明白如何创建make目标,以使Photran与在控制台中输入"make makefile"相同,

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?

谢谢

推荐答案

找到了方法!

我发现Eclipse的使目标"功能令人困惑,但是,这仍然是我所做的:

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

  1. 在makefile所在的文件夹中创建一个新的make目标,在"Target Name"下为其指定任何名称(仅用于Eclipse的目的)

  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)

取消选中与目标名称相同"框,然后从文本框中删除所有字符.它必须为空

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

将所需的任何make命令/标记插入使用构建器设置"中,或将其保留不变

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

双击新创建的目标,Eclipse应该自动调用make并找到您的makefile.这应该会构建您的程序.

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.

这篇关于Photran:使用现有的makefile进行构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆