Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 ディスカッション

Building a project in version 10.0.027

Svein-Atle_Engeseth
ビギナー
594件の閲覧回数

Hi,

I have built a project that consists of a source file and some object files that contain modules that the main source uses. This works well when the build is "Debug", but fails when the build is "Release". The message is, among many, Error: Error in opening the compiled module file. Check INCLUDE paths. [MY_PRECISION].

What is the preferred way to include modules as dependencies? I have a few modules that are used by many programs. Should the modules be put into a library or?

Thanks.

SAE

0 件の賞賛
3 返答(返信)
Steven_L_Intel1
従業員
594件の閲覧回数
You probably added to the "Include" path for the Debug configuration the folder containing the .mod file that resulted from compiling module MY_PRECISION but forgot to do that also for the Release configuration. It is not sufficient to link against the .obj from the module.

What I usually do is create a static library project for shared modules. The .lib from that project can be linked to by the others but I also have to add the path to the .mod files (same place .obj files are put) to the include path list. You cannot put .mod files in any kind of library.
Svein-Atle_Engeseth
ビギナー
594件の閲覧回数

Hi, thanks for the answer, but I still can't make it work. By the way, now I can't make it work in Debug either. When I compile from the command line it works. My problem is like this: I have several source files that each contains one module. These I have made into one static library. The library is D:F90LIBMY_MODS.LIB
All the *.mod files generated from the build are located in D:F90MODULES.I copied the library and *.mod files into the above mentioned locations.
The main source using these modules is located in D:F90PGMT_LINE.F90 and the console project is located at D:IVF_PROJECTSTRANSMISSIONLINE. I have pointed to the above directories through Tools / Options / Fortran / General / Compiler selection / Libraries and Includes. In addition I have in Project / Transmissionline Properties / Fortran / Output filesset $(IntDir);D:F90MODULES;D:F90LIB.

Help!!!

SAE

Steven_L_Intel1
従業員
594件の閲覧回数
The output directory should be a single directory and left alone. You may be unintentionally deleting the .mod files. You can use Tools > Options to add the MODULES folder or do it in the General property page of the project. Make sure the .mod file is actually there.
返信