Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28434 Discussions

Single object file from multiple .for files

jameshart
Beginner
531 Views
Does anybody know a clever way to create single object file from multiple .for (source) files (other than creating (stacking) one large file from all of the .for files)??

Thanks
0 Kudos
2 Replies
james1
Beginner
531 Views
Usually object libraries are used, where the separate object files are created and stored in the single library file. Anyhow you can also do something like:

df /compile /object:single.obj part1.for part2.for

to combine into one object file.

James
0 Kudos
Steven_L_Intel1
Employee
531 Views
If you're in the DevStudio environment, what I usually suggest is creating a source file which looks like this:

include 'file1.for'
include 'file2.for'
...


and then create an alternate project which has just this file in it. When you build this, you are concatenating the sources implicitly.

Steve
0 Kudos
Reply