In a .F90 file, i write the sentence "use bc_set", and i am sure that the file of "bc_set.f90" is added. But when i compile the program by "debug" button. it showed the error below:
error #7002: Error in opening the compiled module file. Check INCLUDE paths. [BC_SET]
I deleted "bc_set.f90" and added it again. The error still appear.
How to fix this problem?
链接已复制
Annalee (Intel) wrote:
Is the module in bc_set.f90 named bc_set? The use statement is base on the module name not the file name.
yes, the module name is also bc_set. Someone say too many "use" may confuse the system, so I move the "use" in some long files to other place, and the problem was solved.
thank you for your timely reply.
"The use statement is base on the module name not the file name."
A source file may contain 0 or more modules.
When module(s) present in source file, each module generates a *.mod file, and potentially a *.obj file where the * represents the module name, not the source file name. Should the source file contain code or data that is not within a module, then the compiler produces an output file (xxx.obj) where xxx defaults to the source file name.
IOW one compilation unit may produce several output files (.obj's and .mod's)
Jim Dempsey
The source file " bc_set.f90 " have the module " bc_set". So i use bc_set. Someone say that if too may use in one source file the system may be confused. So i moved some of the use from a long source file to other place. Now the program can be compiled. I think there was not any logical mistakes, the error was caused by confused "use" rows.