- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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!
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Thanks - I'll put together a test case and let the developers know.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
GTA, I can't reproduce this. Which compiler version are you using?