问题
I am currently working on a large project with a friend and it's time we started working on the same files. We have a dropbox, and we're wondering if there was some way to configure the project so all necessary extra includes/.libs for the libraries we are using in there, so if we change libraries or whatever the other won't have to go download and install anything.
For example, he's working in OpenGL and I'm working with Lua and other libraries. Is there some way to combine all these into dropbox folders and have the project link/compile out of those?
回答1:
Yes, VS2010 has a wide array of super useful macros built in for project sharing.
- Create an
external
folder in your project to hold all libraries you'll be using - All of your include/lib directories should use a SolutionDir macro, as an example one of my additional include directories is
$(SolutionDir)\external\glew-1.9.0\include
The SolutionDir macro is simply the location of the solution relative to the computer. This means two computers could have completely different paths to the solution, but the macro correctly tells the compiler where to find \external\libraryFile\include
Here's an image in an attempt to make it more clear: A larger version someone can actually read
edit: VS has many other useful macros out there, if you do not want it specifically in the solution look into other directory options VS provides.
来源:https://stackoverflow.com/questions/16180454/vs-2012-with-c-group-include-lib