2

I'm trying to get the gfortran compiler with cygwin. When attempting to compile a hello world program, I get the following error:

gfortran: fatal error: -fuse-linker-plugin, but cyglto_plugin.dll not found compilation terminated.

To install the compiler, I used the cygwin setup and selected gcc-fortran: GNU compiler collection libgfortran3: GCC fortran runtime library

I also mistakenly selected the toolchains for mingw, even though I don't have the mingw compiler (as far as I'm aware). g++, which I installed awhile ago, works fine.

What do I need to do to compile/find the library?

innoSPG
  • 4,588
  • 1
  • 29
  • 42
roro
  • 931
  • 5
  • 21

1 Answers1

1

It is because of the gcc and gfortran versions are not same, try checking that. If so, do the following

$ apt-cyg remove gcc-fortran
$ apt-cyg install gcc-fortran

  • This answer was so useful to me. When I used the [Cygwin package search](https://cygwin.com/packages/), I only got three entries with three versions of `netcdf-fortran` ([archived](https://web.archive.org/web/20191111190255/https://cygwin.com/cgi-bin2/package-grep.cgi?grep=fortran&arch=x86_64). I found this post and was able to install it. I went back to the [complete Cygwin package list](https://cygwin.com/packages/package_list.html) had `cygwin64-gcc-fortran GCC for Cygwin 64bit toolchain (Fortran)` and entries for `libgfortran`. That was much harder to find than your answer. – bballdave025 Nov 11 '19 at 19:07
  • 1
    Happy to hear that it helped you. – renormalizedQuanta Nov 13 '19 at 15:41