I’m building a bunch of windows libraries (mostly simple wrappers to compine features from API and third party libraries) to be consumed later by set of applications which have very similar requirements.
Most of libraries are depending from another library and all of them are depending from one common library. This common library contains rather huge amount of header files, which is causing me a problem.
I would like to be able to checkout the libraryA from the version controlling and it to be ready to compile without pulling out libraryCommon or libraryB which the libraryA is depending. The only way I can figure is to copy all the hundreds of headers from common library to all the libraries, but this is kind of ugly solution.
So what is the best way to store “third party” header files into your c++ project? Does something like header library/packages exists?
I’m currently working with Visual Studio 2008, but I would like some more standard C++ solution.
If the libraries are project specific, you will want to install the libraries in a well-known location (/project/$FOO/ or D:\projects\$FOO) and add a version number to the directory because sooner or later you’ll end up supporting a development trunk and a couple of older releases that are in production and just need occasional fixes.
So, create:
Then in the makefile for the actual project that uses those libraries, point to the right version to use. DO not use the directory names with the versions when referring to a header from the source code.
Not like this:
but like this:
Because you don’t want to touch all the source code when updating the library.