Configuring Large C++ Projects in VS2005
-
We are re-doing our VS2005 project layout and I cannot find any good descriptions on how to configure VS2005 to "cleanly" handle projects composed of multiple static libs, dlls and exes. By this I mean what are optimal way to use VS search paths, environmental variables, projects settings, common projects,... etc. I was wondering if there are any good "best practices" references on how to configure our system. Thanks in Advance
-
We are re-doing our VS2005 project layout and I cannot find any good descriptions on how to configure VS2005 to "cleanly" handle projects composed of multiple static libs, dlls and exes. By this I mean what are optimal way to use VS search paths, environmental variables, projects settings, common projects,... etc. I was wondering if there are any good "best practices" references on how to configure our system. Thanks in Advance
I don't know of any documented references. I do know that the solution and project configurations are flexible so you can configure stuff the way is best suited to your development. libs, dlls, and exes are individual projects, not individual elements of a single project A "solution" is generally a group of related projects. VS search paths are global to all projects. FWIW I personally arrange my solution folders something like this: Solution Folder (contains the .sln, ncb, suo files) |_ Bin |_ Lib |_ Common |_ Project1 | |_ Debug | |_ Release | |_ Res |_ Project2 | |_ Debug | |_ Release | |_ Res |_ Project3 |_ Debug |_ Release |_ Res All built exes and dlls are placed in the Bin folder. All built lib files go to the Lib folder. All common (to multiple projects) source code goes in the Common folder. The projects can be any type - lib, dll, exe, etc. This way, all my paths in the project settings can be relative, so if I transfer the entire solution to another drive, folder or machine, no paths need to be changed in the source code or in the project configuration settings. Just my 2 cents, Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
I don't know of any documented references. I do know that the solution and project configurations are flexible so you can configure stuff the way is best suited to your development. libs, dlls, and exes are individual projects, not individual elements of a single project A "solution" is generally a group of related projects. VS search paths are global to all projects. FWIW I personally arrange my solution folders something like this: Solution Folder (contains the .sln, ncb, suo files) |_ Bin |_ Lib |_ Common |_ Project1 | |_ Debug | |_ Release | |_ Res |_ Project2 | |_ Debug | |_ Release | |_ Res |_ Project3 |_ Debug |_ Release |_ Res All built exes and dlls are placed in the Bin folder. All built lib files go to the Lib folder. All common (to multiple projects) source code goes in the Common folder. The projects can be any type - lib, dll, exe, etc. This way, all my paths in the project settings can be relative, so if I transfer the entire solution to another drive, folder or machine, no paths need to be changed in the source code or in the project configuration settings. Just my 2 cents, Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Yes, your configuration is how i do my .net projects. However, I have c++/ unmanaged code only with 30+ dlls and 20+ exe files in about 8-10 different solutions and will have over 250K lines when we get done. My problem is that the dlls in one solution are used with other dll and exe solutions (libary files). I REALLY don't won't to have all of the projects required to build an exe in a single solution. This can quickly get to be unmanageable. So, what I need is how to link all of this together is some sort of reasonable build process using VS without having to go to using external make utilities. This why we are having problems today. One option is to dump all output files into a single directory, but I don't think that this is really great either. My real problem is that VS2005 has a huge number of options on how you configure the IDE and projects. And there does not seem to be a good writeup on how to use this "power" to cleanly build our system. Thanks for your response though Tom
-
Yes, your configuration is how i do my .net projects. However, I have c++/ unmanaged code only with 30+ dlls and 20+ exe files in about 8-10 different solutions and will have over 250K lines when we get done. My problem is that the dlls in one solution are used with other dll and exe solutions (libary files). I REALLY don't won't to have all of the projects required to build an exe in a single solution. This can quickly get to be unmanageable. So, what I need is how to link all of this together is some sort of reasonable build process using VS without having to go to using external make utilities. This why we are having problems today. One option is to dump all output files into a single directory, but I don't think that this is really great either. My real problem is that VS2005 has a huge number of options on how you configure the IDE and projects. And there does not seem to be a good writeup on how to use this "power" to cleanly build our system. Thanks for your response though Tom
Have you also tried asking in the MSDN VC++ forums?
Kevin