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

modules and project dependencies

chuckhp
Beginner
280 Views
Say I have two fortran projects, called A and B for example, within a single master solution. Project B depends on a module contained in project A. If I set project A as a dependency of project B, then it correctly builds A before it builds B and during the linking stage, it has no problem finding the library that was built by project A. However, the problem is that when I am compiling project B, it complains about not finding the .mod file built by project A even though it was already built and is located (by default) in the same directory as the library file that was built (Debug). Now, I understand that I can manually add the path to the .mod file in the settings for project B, but what I don't understand is why I should have to do that since I already established the dependency. Shouldn't it "just know" to look in the output directory of project A to find the .mod file that it needs just like it does to find the corresponding .lib file?

If I only had two porjects, this would not be much of a problem, but I actually have hundreds of projects in my solution with complex dependencies among them. Currently, I am having all the projects dump their .mod files into a single directory called /mods and then including that directory manually within each project. This just seems cumbersome and unecessary if I have already established the correct project dependencies. It this the way it is is supposed to behave or am I doing something wrong?

Chuck
0 Kudos
2 Replies
Steven_L_Intel1
Employee
280 Views
It is behaving as it is "supposed" to, but I fully agree that it would be preferable if the INCLUDE path from dependent projects was also merged in. My guess is that this was not considered because, otherwise, project dependencies are handled entirely within the generic Visual Studio shell and not with language interaction.

I would suggest that you file a Feature Request with Intel Premier Support asking for the module output paths of dependent projects were added to the INCLUDE path of the parent.
0 Kudos
chuckhp
Beginner
280 Views
Thank you very much for your reply. I just wanted to make sure I wasn't overlooking anything obvious. I will file that feature request.

Chuck
0 Kudos
Reply