C++ tag --- Benefit of solution in VC++2008
I made a simple CAD (MFC) using VC++6.0. I w开发者_运维技巧ant to move to VC++2008.
Should I make one Solution and make all my exe and DLLs to many projects?
I opened an old module and it was automatically converted to xxx.vcproj (project) in VC++2008. - How do I create an empty project and how do I add existing projects to it?
As a Solution structure of VS2008, is it reasonable to think one project as one DLL (or EXE)?
Thank you
Makoto
Should I make one Solution and make all my exe and DLLs to many projects?
Yes, provided that (1) there are not too many of EXE and DLL projects, say, fewer than 10 projects.
Plugins and extension DLLs should be put into separate solutions, because they may need recompilation after the main product has been released. DLLs that are stable and implement low-level shared functionalities can be put into a separate solution, as they do not require re-compilation often.
How do I create an empty project and how do I add existing projects to it?
Create an empty solution.
As a Solution structure of VS2008, is it reasonable to think one project as one DLL (or EXE)?
Yes. In fact this is the only way to think about it, because each project can only give one kind of output - EXE, DLL or LIB.
Yes, in VC++2008 it is typical to have a solution with a number of projects, each project being one executable or DLL.
Just click File->New...->Project or something like that from the menu. You can create "empty" projects through that interface, or you can create "simple" hello-world style projects to see what sort of boilerplate VC gives you.
The one hitch that may stump you 'til you figure it out would be that you need to set the start up project, the one that runs when you press F5. Right-click the project that you want to start on F5 and select "set as startup project". Also- be sure to set up the dependencies correctly so that dependent projects get built (so your DLLs get built before you get the executable built that links to it).
精彩评论