Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compilation error for Win32 config

ferrad1
New Contributor I
385 Views

I am adding Win32 configuration to my x64 project, but am getting a compile error for one file:

ctime.f90(51): error #7881: This module file was generated for a different platform or by an incompatible compiler or compiler release. It cannot be read. [ISO_FORTRAN_ENV]

The command line is:

ifort /c /nologo /fpp /debug:full /MP /Od /recursive /reentrancy:threaded /real_size:64 /Qauto /Qtrapuv /Qinit:snan /Qinit:arrays /fpe:0 /fpconstant /object:"..\..\tmp\nlib\Debug\Win32\\" /traceback /check:pointer /check:bounds /check:uninit /check:arg_temp_created /check:stack /libs:dll /threads /dbglibs /c ctime.f90

The (trimmed) code is:

 

 

      subroutine vers()
      use iso_fortran_env
      character(30) stamp
      call compile_time(stamp)
      end

 

 

 

0 Kudos
2 Replies
mecej4
Honored Contributor III
364 Views

Do you have the file ...\OneAPI\compiler\latest\windows\compiler\include\iso_fortran_env.modintr present? If so, what is its size and what is its date?

The OneAPI include directory should contain the source file iso_fortran_env.f90. Compiling that file should produce the module file iso_fortran_env.mod, which you can then use to build the rest of your project. You will have to arrange the Visual Studio project options so that the compiler will find the module file.

0 Kudos
ferrad1
New Contributor I
352 Views

Yes I have them:

C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\include\ia32
11/19/2022 12:56 AM 7,300 iso_fortran_env.modintr
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\compiler\include\intel64
11/18/2022 09:13 PM 8,492 iso_fortran_env.modintr

 

I have included iso_fortran_env.f90 in my project.  It compiles fine. But I still get the error:

error #7881: This module file was generated for a different platform or by an incompatible compiler or compiler release. It cannot be read. [ISO_FORTRAN_ENV]

 

Something that is strange is that if I put a compiler directive around it:

!DEC$ IF DEFINED(_WIN64)
      use iso_fortran_env
!DEC$ ENDIF

the Win32 build still brings up the error.

0 Kudos
Reply