Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Static Lib, This module...different platform

$
0
0

Using VS 2013 with Intel PS 2015 update 4. x64 Release Build

Have static library project (all Fortran), and a "main" Fortran program that uses the library. The library builds without error.

The library, in addition to .obj and .lib files, produces a .mod, which is intended to be used by the "main" Fortran program. When I use (intend to use) the library produced .mod file (located in the .../x64/Release folder of the library project) I get:

This module file was generated for a different platform or by an incompatible compiler or compiler release.

Copying the .mod file to the input folder of the "main" produces the same symptom.

If I remove the project dependency to the library project from the "main" and delete the .mod file (from both locations), I get:

Error in opening the compiled module file.

If add back the project dependency to the library project from the "main" project, rebuild the Library project (to generate the .mod file), then I get the compatibility error message. This illustrates I do not have a path mix-up to different compiled versions.

Both builds are x64 Release.

Also, the build log (with dependency reset)

ifort /nologo /O2 /I"C:\SolutionDir\LibProjectDir\Win32$\(Configuration)"
 /I"C:\SolutinDir\LibProjectDir\x64\Release"
 /module:"Release\\"
 /object:"Release\\"
 /Fd"Release\vc120.pdb"
 /libs:dll
 /threads
 /c
 /Qvc12
 /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\\bin"
 "C:\SolutionDir\MainProjectDir\file.f90"
C:\SolutionDir\MainProjectDir\file.f90(2): error #7881:
 This module file was generated for a different platform or by an incompatible compiler or compiler release.
 It cannot be read.   [MY_MODULE]
use my_module

Now, why does /module:, and /object: have "Release\\" instead of "x64\Release"?

Note, both are generated into the "x64\Release" folder.

Jim Dempsey 


Viewing all articles
Browse latest Browse all 3270

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>