0

I'm building ECCODES on a Windows system using MinGW64. ECCODES is built with CMake, and includes Fortran and C source. After considerable pain finding a gfortran version that would build the Fortran code in this Windows environment, I've gotten everything to compile, but a Fortran executable won't build because of one lousy undefined reference, to __mingw_get_msvcrt_handle. How do I solve this?

c:/progra~2/simply~1/mingw-~1/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/
  ../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0x2b8):
  undefined reference to `__mingw_get_msvcrt_handle'
usr1234567
  • 21,601
  • 16
  • 108
  • 128
gknauth
  • 2,310
  • 2
  • 29
  • 44
  • 2
    Could be a mix-up of two toolchains (see e.g. [here](http://stackoverflow.com/questions/34540673/mingw-cross-compiling-error-undefined-reference-to-mingw-get-msvcrt-handle)). Please consider [`make` with verbose output](http://stackoverflow.com/questions/2670121/using-cmake-with-gnu-make-how-can-i-see-the-exact-commands) to see if you have a library path pointing to another toolchain installation. – Florian Apr 26 '16 at 18:55
  • Thanks @Florian. Trying it now. – gknauth Apr 26 '16 at 19:54

0 Answers0