- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
How can I specify file-level, compilation order?
I'm presently placing modules in files where they don't naturally belong (e.g., matrix module in a file of statistics modules) to avoid compilation errors because they are being USEd before they would otherwise have been compiled. It seems compilation order is alphabetical by file name when I perform a project build.
I'm almost tempted to place all modules in a single file and order them to facilitate compilation.
I'm using Visual Fortran Compiler XE 12.0.3.175 and Microsoft Visual Studio 2008.
Thanks,
-- jv
P.S. Apologies for this off-topic post. My Knowledge Base and web searches provided no helpful information.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unless you have errors in your code, such as a circular module dependency, the order should be correct automatically. If it isn't, we'd like to see a ZIP of the project where it is a problem.
For best results, put each module in a separate source file. And your post is definitely not off-topic!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the replies.
I do not believe I have circular dependencies, but I should check that again.
Presently, I have multiple modules in all files.
Should I place each module in a separate file and perform a clean build to see if the problem persists and prior to posting my solution files? I am a little confused by the "for best results, ..." suggestion.
Thanks,
-- jv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You might also try removing all the sources from the project and then readding. This probably has no effect, but it's easy to try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I think I found a very small bug and I think this is the best place to put it. when specifiying wich modules a module should you as such:
module main
use sub_modA
use sub_modB
....
if you do this the build order gets messed up:
module main
use sub_modA !personal_comment
use sub_modB!personal_comment
...
The comment next to sub_modB messes things up unlike the one that has next to sub_modA which has a space before the comment. Took me forever to figure out this was what was happening. Anyway thought your development team should know so they could address the issure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - I'll put together a test case and let the developers know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GTA, I can't reproduce this. Which compiler version are you using?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page