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

Module should compile before files referencing it

New Contributor I

I am using VS community edition 2017 with IVF 19 update 5.  I just added an new module and one of the files that uses it is being compiled before the module and I am getting missing reference errors.  I know that VS decides the order of how the files are compiled.  How do I correct this issues?




0 Kudos
1 Reply
Honored Contributor II

The first thing to do is ensure you do a "clean build" that option deletes all the output files  before you start and does a full build. Sometimes the problem goes away it is just because adding files had been known to confused it....

sometimes if fails and then you do a normal build and it works the seconds time.  This is normally because you have a circular dependence A needs B and B needs A. For the second build B exists from the first so A now works and then B get built again. Another system is the project is always out of date and it thinks it needs to be built.

You need to fix that.  Using Submodules is one way.



0 Kudos