LightFifty007 发表于 2019-12-16 13:23:44

Can't open module file 'func.mod'

大佬们好,新人求助!
操作系统:Ubuntu
编译器:   gfortran
错误提示:Can't open module file 'func.mod' for reading at (1): No such file or directory compilation terminated.

胡文刚 发表于 2019-12-16 17:20:19

找不到 module func,请找到它并编译它。然后就正常了。

LightFifty007 发表于 2019-12-20 18:30:53

胡文刚 发表于 2019-12-16 17:20
找不到 module func,请找到它并编译它。然后就正常了。

明白了,谢谢

FreemanArthur 发表于 2020-7-5 11:42:36

本帖最后由 FreemanArthur 于 2020-7-5 11:45 编辑

接楼,留个笔记
obj 文件是目标代码。

mod 文件是由 module 模块生成的,用来让编译器互相了解其他 module 的内容(接口,公有变量等)

obj 用来链接成最终的程序(exe或dll等)

而 mod 用来让编译器在编译其他代码时,获得该module的信息。不参与链接。

https://iknow-pic.cdn.bcebos.com/d439b6003af33a87faa77ca4c75c10385243b541?x-bce-process=image/resize,m_lfit,w_600,h_800,limit_1

转自:https://zhidao.baidu.com/question/556760883.html
页: [1]
查看完整版本: Can't open module file 'func.mod'