- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fact that /module points to the 32-bit folder is a clue., You should open the Configuration Manager to make sure that all the projects in your configuration have x64 set as the platform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By the way, the command line property page shows:
/nologo /O2 /I"C:\SolutinDir\LibProjectDir\x64\Release" /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc120.pdb" /libs:dll /threads /c
IOW shows with the "x64".
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That fixed the problem.
It is odd, to say the least, that you can use the configuration manager add x64 (from Win32)...
See and select the platform and configuration (Release, x64).
Perform the build (of the library) no errors. and See the files
Perform the (Release, x64) of the "main" (getting errors).
It seems to me that the configuration manager should grey out the selections if the build box isn't set.
While this is an MS issue (and user issue), it would be helpful if ifort could issue a more meaningful message when it sees a mixup of options.
Thanks for the pointer. And the speedy response.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page