- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a Visual Studio Project that contains a module XXwhich includes several files each with some long subroutines. Those subroutines use other modules YY and ZZ in the same project. If I do a clean and then do a build, the build fails because the XX module is compiled before the YY and ZZ modules. (There are some variable names that appear in both YY and ZZ, so they cannot both be referenced by a USE clause in XX.)
Is there a way to tell the project to compile YY and ZZ first?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a Visual Studio Project that contains a module XXwhich includes several files each with some long subroutines. Those subroutines use other modules YY and ZZ in the same project. If I do a clean and then do a build, the build fails because the XX module is compiled before the YY and ZZ modules. (There are some variable names that appear in both YY and ZZ, so they cannot both be referenced by a USE clause in XX.)
Is there a way to tell the project to compile YY and ZZ first?
Yes if you put them in seperate projects within the one solution.
Then in the IDE Solution Explorer highlight the solution. Click Project->Project Build Orderand a dialog box shows with tabs Build Order and Dependencies. This is where you tell it to build Project YY then Project ZZ then Project XX
And in Dependencies you tell it that Project XX depends on YYand ZZ
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... If I do a clean and then do a build, the build fails ...
Yes, this is the continuing non-operation of the Dependency Checker, an issue which has been raised numerous times in this forum, and we are assured each time that it actually works well.
I have found, almost by accident, that IVF does produce an automatic rebuild-all of my project (many modules, highly complex interdependencies) in debug mode, whereas the release mode clean build always fails.
A previous poster on this issue suggested that IVF might incorporate a user-supplied build order for multi-module projects, so that Rebuild-All could follow a script rather than try (and fail) to figure it out automatically. This would probably be a lot easier to implement than fixing the dependency checker, and would totally solve this problem. (Note- this is completely different from the above suggestion to game the system by putting each module in its own project whose dependencies can be explicitly specified.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, this is the continuing non-operation of the Dependency Checker, an issue which has been raised numerous times in this forum, and we are assured each time that it actually works well.
I have found, almost by accident, that IVF does produce an automatic rebuild-all of my project (many modules, highly complex interdependencies) in debug mode, whereas the release mode clean build always fails.
A previous poster on this issue suggested that IVF might incorporate a user-supplied build order for multi-module projects, so that Rebuild-All could follow a script rather than try (and fail) to figure it out automatically. This would probably be a lot easier to implement than fixing the dependency checker, and would totally solve this problem. (Note- this is completely different from the above suggestion to game the system by putting each module in its own project whose dependencies can be explicitly specified.)
I did fix the problem byputting USE YY, ONLY: var_YY and USE ZZ, ONLY: var_ZZ into module XX . (var_YY and var_ZZ are each only in their respective modules.) That forced the right compilation order without IVF needing to descend into the INCLUDEs to resolve the order.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did fix the problem byputting USE YY, ONLY: var_YY and USE ZZ, ONLY: var_ZZ into module XX . (var_YY and var_ZZ are each only in their respective modules.) That forced the right compilation order without IVF needing to descend into the INCLUDEs to resolve the order.
Hmm ONLY: xxx exits the dependency checking once xxx is resolved. Didn't know that. Nice to know.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page