Compile Fortran files in VS 2010

I have fortran projects in VS 2010, after i install visual fortran for vs 2010 and tried to build any of these projects, i’m getting these errors:

Unable to open MODULE file XXXXX.mod

Any directions ?

Hi moss81,

This error indicates that the dependent module could not be found. There are a number of reasons why this may occur.

On your first compile, the compiler will attempt to create a dependency list for your project. It builds your Fortran files in alphabetical order. If a file fails to build, it gets put back in the list and then recompiled later. During this process you will see these errors but eventually they will go away as the dependency list is created.

The cases where this process will fail is when a module file fails compile for another reason. This cause the module to not be created and thus other dependent compilation will also fail.

Also, if you are moving a project or add dependent modules, then the you may need to first need to clean your project (to remove the old dependency list) before rebuilding.

If your dependent modules are located in elsewhere (like from a different project) then you need to add these directories to your project’s ‘Module Path’ property.

Hope this helps,