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

Linking f90 code with a f77 library

act21
Beginner
580 Views
I am trying to compile some f90 code and link it to a f77 compiled library - how do I do this?
0 Kudos
3 Replies
Steven_L_Intel1
Employee
580 Views
By "f77" do you mean g77 or some Fortran compiler other than Intel Fortran? If so, you probably can't and should recompile the sources in Intel Fortran. If it's just code that was written to the F77 standard, as long as it is compiled by Intel Fortran, there's no problem. Anything standard in F77 is standard in F90 and is accepted by the Intel compiler.
0 Kudos
act21
Beginner
580 Views
... I have a set of libraries written in fortran 77 which I have compiled using ifort. I now want to link them to some code written in f90 and compiled again using ifort. Do I have to add a special incantation when I link? Sorry for what is probably a stupid question - I am new to this!
0 Kudos
Steven_L_Intel1
Employee
580 Views
Ok, now I see. No, there's nothing special to do. Your "f77" code is also f90 code. As long as you compile it all with ifort, you'll be fine.

It is a common misconception that f77 and f90 are distinct languages. Everything in f77 is in f90. Fixed and free form are both standard in f90 and you can write f90/95/2003 code in fixed-form.
0 Kudos
Reply