tags:

views:

41

answers:

2

I made a simple CAD (MFC) using VC++6.0. I want 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

A: 

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.

rwong
I've seen solutions with upwards of 50 projects in them, and they worked fine (at least, on a relatively powerful machine they did). Also, there's no reason why one project can't appear in multiple solutions (for your shared DLLs and LIBs).
dash-tom-bang
Thanks a lot, guys. Your suggestions are very helpful. I created a new solution and added 12 projects I had. One of them is EXE and all others DLLs.
makoto honda
A: 

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).

dash-tom-bang
Thanks for the advice. I added one old EXE and 11 old DLL projects. I set EXE project as Starter Project. I cannot figure out how to set dependencies for these DLLs.... I do have a specific order (dependency) that I have to follow to build these DLLs. That is, each DLL (project) has dependency to some other DLLs, and this link dependency is already set in each project (since these are old projects from VC++6.0). My question is: How do I set this info in the Solution context, so that when I update some DLLs, the solution knows which DLLs (projects) must be rebuilt.
makoto honda
From *Solution Explorer*, right click the *Solution*, then go to *Project Dependencies*.
rwong
Sorry, but I was looking around in VC++2008 and found how to set project dependencies in the Solution Property Page!Thanks.
makoto honda