A library that was previously build successfully with MSVS 2019 is now failing due to the following error on most if not all subroutines/functions in the project:
error #8110: The module file for compiler-generated interface was generated for a different platform or by an incompatible compiler or compiler release. It cannot be read. Use -gen-interfaces option. [XXX__GENMOD]
1>fortcom: Fatal: There has been an internal compiler error (C0000005).
I will note that the Debug Win32 version of the same library has no errors. The error occurs in the Release x64 version.
I am using Microsoft Visual Studio Community 2019 Version 16.9.6 and Intel® Fortran Compiler Classic 2021.2.0 [Intel(R) 64].
Thanks in advance!
There is some confusion in your description as to whether you are rebuilding a library or rebuilding an EXE that uses the pre-built library. The .MOD files that the compiler uses to ascertain interface information are not part of a library, but are usually placed in a separate directory than the directory containing the LIB files.
You may have left-over module files from previous builds in your project, and just deleting them (either directly or by using a VS Clean operation prior to building your EXE) may resolve your problem.
Thanks @mecej4 and @andrew_4619 . The suggestion of cleaning files worked but was not as simple as I expected. First of, using clean in MSVS was not removing the files. Second, I had to clean out the Debug IA-32 and Release Intel64 directories before it started working again. I have used this project for several years and have never had a problem.
Further, isn't an Internal Compiler Error always a bug?
An Internal Compiler Error is a bug but you might have a problem make a reproducer. I am surprised you had to clean more than one folder I suspect that is the trigger for the problem is I recall the files are deleted by wildcard so it should not leave old files, unless the behaviour has changed......
Many compilers are known to run into an ICE or other error when given MOD files from another compiler (or older versions of themselves). Expecting a compiler to detect the format of the MOD file is probably a bit too much. I have seen some operating systems trying to open and play .MOD files as sound files!