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

compilation order dependency?

Jim_Vickroy
Beginner
1,559 Views

Hello,

I am usingIntel Visual Fortran Compiler XE 12.0.3.175 [IA-32].

I have a (simplified), three-file, Microsoft Visual Studio 2008 Project that generates compilation errors after "Clean Solution" followed by "Build". The compilation errors appear to arise because a module (in one file) "uses" a module (in a second file) that has yet to be compiled.

All modules, in each file, individually compile without errors provided dependencies are compiled first.

I did not see how to attach a ZIP archive of the Project to this posting.

I would appreciate feedback on what my mistake is (and how to attach a file to a posting).

Thanks.

0 Kudos
1 Solution
Steven_L_Intel1
Employee
1,559 Views
Some things to try:

1. Remove the files from the project and re-add them.
2. Split the files into individual files per module.

View solution in original post

0 Kudos
9 Replies
Steven_L_Intel1
Employee
1,559 Views
For attaching files, see link in my signature below or in the "Useful Links" section of the main forum listing.
0 Kudos
Jim_Vickroy
Beginner
1,559 Views

Thanks, Steve. I beleive a ZIP file is now available. -- jv

0 Kudos
Jim_Vickroy
Beginner
1,559 Views
I believe the URL ishttp://software.intel.com/file/37601. -- jv
0 Kudos
Steven_L_Intel1
Employee
1,559 Views
I tried building this in 12.0.4 and had no problems.
0 Kudos
Jim_Vickroy
Beginner
1,559 Views

Thanks for trying this.

Here is my build log:

[bash]1>------ Build started: Project: Solar Thematic Maps, Configuration: Release Win32 ------
1>Compiling with Intel Visual Fortran Compiler XE 12.0.3.175 [IA-32]...
1>globals.f90
1>files.f90
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(87): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [ERROR_COMPONENT]
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(114): error #6404: This name does not have a type, and must have an explicit type.   [IS_ERROR]
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(114): error #6341: A logical data type is required in this context.   [IS_ERROR]
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(133): error #6404: This name does not have a type, and must have an explicit type.   [IS_ERROR]
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(133): error #6341: A logical data type is required in this context.   [IS_ERROR]
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(146): error #6341: A logical data type is required in this context.   [IS_ERROR]
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(157): error #6404: This name does not have a type, and must have an explicit type.   [IS_ERROR]
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(172): error #6404: This name does not have a type, and must have an explicit type.   [IS_ERROR]
1>C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90(172): error #6341: A logical data type is required in this context.   [IS_ERROR]
1>compilation aborted for C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic Mapsfiles.f90 (code 1)
1>
1>Build log written to  "file://C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSolar Thematic MapsSolar Thematic MapsReleaseBuildLog.htm"
1>Solar Thematic Maps - 10 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/bash]

0 Kudos
Steven_L_Intel1
Employee
1,560 Views
Some things to try:

1. Remove the files from the project and re-add them.
2. Split the files into individual files per module.
0 Kudos
Jim_Vickroy
Beginner
1,559 Views

Thanks again Steve.

Since this may be an error in compiler version 12.0.3.175, I'll submit a request to upgrade to version 12.0.4.

I have (partially) tried your first suggestion; I will revisit that.

Moving each module into a separate file (suggestion 2) seems unappealing to me, but if I have no other short term option I will try that also.

0 Kudos
Jim_Vickroy
Beginner
1,559 Views

Suggestion 1 (remove/re-add source files to Visual Studio Project) worked !

I do not know why this worked nor which component (Fortran compiler, Visual Studio) was the source of the error.

-- jv

0 Kudos
Steven_L_Intel1
Employee
1,559 Views
Well, it's not the compiler, but might be the Fortran integration into VS. I'll ask the integration developers about it - yours is not the first complaint about this I have seen.
0 Kudos
Reply