Linking new objects with existing ones

If you have .o or other object files that you compiled with an earlier version of XL Fortran, you can link them with object files that you compile with XL Fortran V15.1.3, subject to the following notes. The main XL Fortran library is libxlf90.a, but calls to older entry points in libxlf.a are still possible; the calls are passed to the new entry points in the main libraries, which makes the resulting programs slower than if everything is recompiled.
Note:
  • If you used the -qautodbl option to create your object files, all object files in your program must use the same -qautodbl setting.
  • XL Fortran V11.1 introduced a new descriptor format. All object files in your program must use the same descriptor format. Refer to the -qdescriptor option for information on specifying the descriptor format.
  • You must explicitly specify the XL Fortran libxlf.a library as part of the link step, preferably by including the option -lxlf.
  • For safety, always put -lxlf as the first option after the compiler command so that the library is linked before any user object files. Doing so ensures that the new I/O routines override any existing ones in statically linked object files.
  • When you relink old object files, the I/O routines in the resulting program differ in some ways from the behavior of XL Fortran Version 2. To make the resulting program work as you expect, you may need to change some of the runtime settings in Setting runtime options (particularly the namelist setting) or to recompile the source files with the -qxlf77 option. Some changed I/O details cannot be switched to the old behavior at all.
  • You cannot link files that you compiled with the XL Fortran Version 4 level of IPA with files that you compiled with the XL Fortran Version 6 level or later of IPA.
  • The 64-bit object format generated by XL Fortran version 7.1.0.1 or earlier is not compatible with the 64-bit object format on the AIX® level that this XL Fortran release supports.
  • Object files created using the -qpdf1 and -qpdf2 options must be linked with the same level of the XL Fortran compiler that compiled them. For example, object files created using the -qpdf1 and -qpdf2 options with Version 12.1 or earlier levels of XL Fortran cannot be linked with Version 13.1 or later levels of XL Fortran.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us