链接到外部目录中的模块Compaq Visual Fortran命令提示符 [英] Linking to modules in external directory Compaq Visual Fortran command prompt

查看:358
本文介绍了链接到外部目录中的模块Compaq Visual Fortran命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题是非常具体的,但我使用Compaq Visual Fortran优化编译器,版本6.5(Fortran 90)。要编译,例如,我使用:

I know that this question is VERY specific, but I am using "Compaq Visual Fortran Optimizing Compiler, Version 6.5" (Fortran 90). To compile, e.g., I use:

f90 constants.f90 main.f90 /compile_only 

我不知道如何链接除了使用命令DF,但据我所知,编译AND链接AND输出要执行的.exe。

And I'm not sure how to link aside from using the command "DF", but as far as I understand, that compiles AND links AND outputs a .exe to be executed.

我的问题是,我有一些模块,我在我的主程序中使用,我希望这些模块在一个文件夹和我的主程序在另一个,但是,当我尝试使用指令像-i dir链接程序和使用的模块,他们不工作,我得到以下错误:

My problem is that I have a few modules that I USE in my main program, and I want those modules to be in one folder and my main program to be in another, but, when I try to use directives like -i dir to link the program and the used modules, they don't work and I get the following error:

error: Switch '-i' is ambiguous.

任何帮助,即使只是指向正确的方向, b $ b

Any help, even just pointing me in the right direction, is greatly appreciated.

推荐答案

阅读您的编译器手册


/ [no] include

/[no]include

语法:

/ include [:path ...],/ noinclude或/ Ipath

/include[:path...], /noinclude, or /Ipath

/ include或/ I选项指定要
搜索模块文件(USE语句)和包含文件(INCLUDE
语句)的一个或多个附加目录(路径)。

The /include or /I option specifies one or more additional directories (path) to be searched for module files (USE statement) and include files (INCLUDE statement).

这篇关于链接到外部目录中的模块Compaq Visual Fortran命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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