24小时热门版块排行榜    

查看: 697  |  回复: 0

sadrime

新虫 (初入文坛)

[求助] 关于liunx下使用ivf编译器,idb调试工具的使用

有两个fortran程序文件,一个是主文件hello.for,另一个是子文件hello2.for
主文件hello.for代码:
CODE:

   program hello     
   write(*,*) 'hello world'
   call hello2  
    end program hello

子文件hello2.for代码:
CODE:

      subroutine hello2
      write(*,*) 'hello word again!!'
      end subroutine hello2

makefile文件如下:
CODE:
hello: hello.o hello2.o
   ifort -o hello hello.o hello2.o
hello.o: hello.for
   ifort -c hello.for
hello2.o: hello2.for
   ifort -c hello2.for

编译,运行都可以,但现在我想使用idb调试,如果将两个文件的内容合成一个文件的话:
可以使用
ifort -debug -O0 hello.for -o hello
然后idb hello,可以调试
但是现在有两个文件,在makefile里面应该怎么写呢?
谢谢大家,金币不富裕,还请大家见谅~
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

相关版块跳转 我要订阅楼主 sadrime 的主题更新
信息提示
请填处理意见