Jump to content
  • Advertisement
Sign in to follow this  
JeffNiko

VS2008: Multi-Project Solution Setup

This topic is 3958 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!