- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
using Visual Studio 2008 and Intel Fortran 11.1 I run into some nasty problems with the build order
within a project. I have a collections of source files and each contains a module. Some modules within
the project use other modules from that project. The problem I run into is that module A in file A may
use module B in file B, but file A is built _before_ module B, so that the compilation fails the first
time around. It does succeed the second time, because then file B has been compiled, so that the
intermediate file for module B is available.
Is there a way, short of refining the organisation in projects so that no such dependencies within
a project remain (*), to guarantee that file B is compiled before file A?
Regards,
Arjen
(*) Reorganising the project structure would be a thorough nuisance, as it would create countless
of little projects, and endless INCLUDE paths.
using Visual Studio 2008 and Intel Fortran 11.1 I run into some nasty problems with the build order
within a project. I have a collections of source files and each contains a module. Some modules within
the project use other modules from that project. The problem I run into is that module A in file A may
use module B in file B, but file A is built _before_ module B, so that the compilation fails the first
time around. It does succeed the second time, because then file B has been compiled, so that the
intermediate file for module B is available.
Is there a way, short of refining the organisation in projects so that no such dependencies within
a project remain (*), to guarantee that file B is compiled before file A?
Regards,
Arjen
(*) Reorganising the project structure would be a thorough nuisance, as it would create countless
of little projects, and endless INCLUDE paths.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The dependency analysis is supposed to sort that out for you automatically. I have seen it ocassionally get confused (for example - today I moved a module in its entirety between source files and that had the compiler gazing at its navel for a while), but it sorts itself out after a rebuild or two.
Make sure you don't have a cyclic dependency (A depends on B depends on C depends on A, etc).
You other post about re-build vs clean plus build makes me wonder whether there's something else going on.
Make sure you don't have a cyclic dependency (A depends on B depends on C depends on A, etc).
You other post about re-build vs clean plus build makes me wonder whether there's something else going on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am pretty sure we do not have a cyclic dependency, but perhaps I am wrong. It seems a likely explanation
for this phenomenon, thoughI have seen successful single builds (even more awkward: some of my
colleagues working on this project do get a successful build in one go, others don't, while everything seems
to be the same: VS, Intel compiler, source code).
Regards,
Arjen
for this phenomenon, thoughI have seen successful single builds (even more awkward: some of my
colleagues working on this project do get a successful build in one go, others don't, while everything seems
to be the same: VS, Intel compiler, source code).
Regards,
Arjen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arjen,
Try: Right-Click on Solution name
Build Order
Then examine the chosen build order. If this is not correct, click on the dependencies tab, then the projects pull-down tab will select the focus to one of your projects, then check the appropriate Depends on check boxes. Repete for each problematic project.
Also, re-examine your soruce code as you may have USE someModule that produces a circular list. On occasion I've had to split two modules into three (usually two code files with the contains subroutine/functions and one new module with the combined data).
Jim Dempsey
Try: Right-Click on Solution name
Build Order
Then examine the chosen build order. If this is not correct, click on the dependencies tab, then the projects pull-down tab will select the focus to one of your projects, then check the appropriate Depends on check boxes. Repete for each problematic project.
Also, re-examine your soruce code as you may have USE someModule that produces a circular list. On occasion I've had to split two modules into three (usually two code files with the contains subroutine/functions and one new module with the combined data).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Argh!
We do have a circular dependency! Not in the files that caused most complaints though, but in
some other ones. Okay, clear enough, I will have to solve this one.
Regards,
Arjen
We do have a circular dependency! Not in the files that caused most complaints though, but in
some other ones. Okay, clear enough, I will have to solve this one.
Regards,
Arjen

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page