How to stop the build after compilation?
-
Is there any way to get Visual Studio to just compile and not try to link? I'm building co-dependent dlls so I need to do all the compiles across several projects which also build import libraries and then go back in a second pass and link them. It works now by having 2 essentially identical build configurations. I build the first one, all the compiles succeed by all the links fail. The second one then uses all the object files and import libraries built by the first config and the link succeeds. The issue is as the project gets larger the first build configuration wastes lots of time trying and failing to link the dlls and spewing hundred of unresolved external messages. Is there any way to persuade it to just give and not try to do the link stage? A work around for any version of VS would be useful I'm using VC6, VS2005, VS2008, VS2010, and VS2012. Many thanks.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
Is there any way to get Visual Studio to just compile and not try to link? I'm building co-dependent dlls so I need to do all the compiles across several projects which also build import libraries and then go back in a second pass and link them. It works now by having 2 essentially identical build configurations. I build the first one, all the compiles succeed by all the links fail. The second one then uses all the object files and import libraries built by the first config and the link succeeds. The issue is as the project gets larger the first build configuration wastes lots of time trying and failing to link the dlls and spewing hundred of unresolved external messages. Is there any way to persuade it to just give and not try to do the link stage? A work around for any version of VS would be useful I'm using VC6, VS2005, VS2008, VS2010, and VS2012. Many thanks.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
This is the way I handle this... - Make a workspace project that is basically your master workspace (just create an empty solution). - Start adding the project files from each of your projects. - Label dependencies to one another (this will configure the proper build order). ...and now you have a master workspace that can build all your projects in proper order and you can work from without errors or warnings.
-
This is the way I handle this... - Make a workspace project that is basically your master workspace (just create an empty solution). - Start adding the project files from each of your projects. - Label dependencies to one another (this will configure the proper build order). ...and now you have a master workspace that can build all your projects in proper order and you can work from without errors or warnings.
Thanks for the reply. How does this manage when you have mutual dependency between DLL projects? I have A.exe, B.dll and C.dll. A depends on B and C which is fine. B depends on C and C depends on B which is not so fine. It works with a two pass solution but the link in the first pass and compile in the second pass are a complete waste of time, 10-15 minutes for the full project on the fastest machine I've got. I've cut the project back to just the bits I'm working on so at the moment it's not causing me grief but in the long term it would be really nice to clean this up especially if I'm going to post it as an article.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
Thanks for the reply. How does this manage when you have mutual dependency between DLL projects? I have A.exe, B.dll and C.dll. A depends on B and C which is fine. B depends on C and C depends on B which is not so fine. It works with a two pass solution but the link in the first pass and compile in the second pass are a complete waste of time, 10-15 minutes for the full project on the fastest machine I've got. I've cut the project back to just the bits I'm working on so at the moment it's not causing me grief but in the long term it would be really nice to clean this up especially if I'm going to post it as an article.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
Works like a charm... that's why I use the method. I have a huge project made up of about 20+ smaller projects (the project has been going on for quite a while so it's not like I made the whole thing, I'm just maintaining it and adding new features).
-
Works like a charm... that's why I use the method. I have a huge project made up of about 20+ smaller projects (the project has been going on for quite a while so it's not like I made the whole thing, I'm just maintaining it and adding new features).
Thanks, I'll have to reconstruct the solution for the overall project at some point and I'll bear this in mind. Will be very neat if it can be made to work just like that.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
Thanks, I'll have to reconstruct the solution for the overall project at some point and I'll bear this in mind. Will be very neat if it can be made to work just like that.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
I've been using this method for years now... it's a bit strange at first, since you essentially have a solution that has no code but is just a bunch of other projects all in one workspace, but it really makes working with a lot of co-dependencies easier. It also helps with debugging code since you can build all of your dlls and executables in debug from the same place.