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

visual studio config to find mod files

ripittard
New Contributor I
919 Views

I am new to using visual studio and Intel fortran, so please bear with me.  I have a group of fortran routines in a project which compile fine into a library and generate mod files.  I have a second VS project in which the main fortran routine has a couple of USE statements related to the mod files that were built in the first project.  How to I configure VSS so that IFORT can find the mod files built by the first project?

 

Thanks for any help

Labels (3)
0 Kudos
1 Solution
Arjen_Markus
Honored Contributor I
908 Views

If your two projects are in the same VS solution, then you can simply set the dependencies: project 2 depends on project 1. Use the right mouse button to bring up the relevant pop-up menu.

If your two projects are in different VS solutions, then the only option is to use the "Additional includes directories" option in the Fortran properties for the project. You then specify the exact location of the mod files. But in that case you will also need to specify the library created by the first project via the Linker properties. 

View solution in original post

0 Kudos
3 Replies
Arjen_Markus
Honored Contributor I
909 Views

If your two projects are in the same VS solution, then you can simply set the dependencies: project 2 depends on project 1. Use the right mouse button to bring up the relevant pop-up menu.

If your two projects are in different VS solutions, then the only option is to use the "Additional includes directories" option in the Fortran properties for the project. You then specify the exact location of the mod files. But in that case you will also need to specify the library created by the first project via the Linker properties. 

0 Kudos
ripittard
New Contributor I
902 Views

Thanks Arjen, both projects are in the same solution and have the correct dependency set.  I get the following error (among others):

Error error #7013: This module file was not generated by any release of this compiler. [SLSQP_MODULE] C:\Users\Rick\IDrive-Sync\Fortran\slsqp_test_2.f90 8

 

If I combine all the source files into one project then there is no problem, so I am clearly missing somethign in the config setup.  

 

0 Kudos
ripittard
New Contributor I
892 Views

I found my problem - I had some mod files created by gfortran in the PATH.

0 Kudos
Reply