Sign in to follow this  

VS2008: Multi-Project Solution Setup

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im using C++ in Visual Studio 2008, and I'm familiar with writing my games in one project within a solution. Now I want to tackle a client-server multiplayer game. I have created my solution, MyGameSolution, with a project, MyGameServer. Then, I add a second project to the solution, MyGameClient. Of course, the server and client will have many classes in common. Where is the efficient (or necessary) place to put the class files for the common classes? Server project? Client project? A new common folder? I realize I should be able to decide whats best for my situation, but I cannot seem to find a configuration that allows me to have two projects referencing the same classes so don't have to have a separate copy of the files in each project folder. Thanks in advance for any instructions or advice.

Share this post


Link to post
Share on other sites
You have two solutions: Server and Client.


Server.sln
+-- network (project) - shared
+-- network_server (project)
+-- game (project)


Client.sln
+-- network (project) - shared
+-- network_client (project)
+-- game (project)


Above, network project is shared between both. Other two projects are client/server specific.

Share this post


Link to post
Share on other sites
Quote:
Original post by JeffNiko
I cannot seem to find a configuration that allows me to have two projects referencing the same classes so don't have to have a separate copy of the files in each project folder.


Create a library project for common classes that compiles to DLL. Then you can reference it by both client and server projects

Share this post


Link to post
Share on other sites

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this