- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
--Lorri
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page