Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

ifort: warning #10145: no action performed for file 'A.obj'


I am under windows (as the obj extension shows).

I have two valid .f90 files `A.f90` and `B.f90` (place in the same folder) where `B.f90` uses `A.f90`, the code of `B.f90` being :

module B
use A
! ... stuff

The code of `A.f90` is 

module A
! ... stuff

I compile `A.f90` with :

ifort -c -fpp A.f90

Now I would like to compile `B.f90` "while taking accound of" `A.f90`, that is, of its `.obj` file.

So I tried :

ifort -c B.f90 A.obj

which throws

ifort: warning #10145: no action performed for file 'A.obj'

at me.

Is the command

ifort -c B.f90

proper to compile `B.f90` "while taking accound of" `A.f90`, that is, of its `.obj` file ?

I would like B.f90 it to be compiled "as A.f90 is", as in fact I have a third C.f90(containing a use B) and that at the end I must run the command :

ifort -dll toto.dll A.o B.o C.o

to compile a dll while linking to all object files from A, B, C.

0 Kudos
1 Reply

When  you use "-c", as you did in this line:
   ifort -c B.f90 A.obj

you're telling the compiler you only want to create an object file, not an executable.

If B is using a module defined in A, you don't need to compile against the object file; the module information is stored in a file called A.mod.

For Windows, mod files are found in the INCLUDE path, or by passing the directory location using either /module:directory-path, or /include:directory-path

     Does this help?