Search code examples
visual-studio-2010visual-c++directoryprojects-and-solutions

VS2010 Project on Multiple PCs


I'm using Visual Studio to code a C++ program, with its source repository managed by SVN. I'm trying to have the solution compliable on multiple computers. The problem is, the libraries and include directories differ on both computers.

For instance, on one, the libraries are in (for instance) e:\devlib\boost_46_1\libs\regex\build, E:\devlib\SDL-1.2.14\lib etc and on the other computer in c:\programming\lib\boost_46_1\libs\regex\build and c:\programming\SDL-1.2.14\lib

Likewise for includes - which have the added layer of complication as to needing to retain the folders in the #includes in the actual source code (such as #include )

How do I structure my folders/source/vs solution/computer to make the solutions be able to compile on any of my computers without me having to separately list the library folders and maintain different project/solution folders for each?

I do understand one potentially valid solution to be include the libraries in the folder structure of the source, so that all the library folders can be, for instance "../libs" and "../inc" or something. However, given the sheer size of (for instance) boost, this solution is undesirable - especially with source control.


Solution

  • Place any third party libraries into a folder in your solution, place under source control and reference from this solution rooted folder.

    Don't worry about the size; since these won't change that often, you will retrieve them infrequently.