gcc is perfectly fine as a loader. The main problem is that gfortran uses
some of its own libraries and so if you want to link with gcc a code compiled
with gfortran, you need to add the link to the gfortran libraries.
That is what gcc is complaining about with:
- Code: Select all
undefined reference to `_gfortran_set_std'
undefined reference to `_gfortran_st_write'
undefined reference to `_gfortran_transfer_character'
undefined reference to `_gfortran_st_write_done'
Rather than finding which libraries you are missing in your system, a
standard advice is to use the Fortran compiler as the loader.