Configuration Management

Coders really prefer to re-invent the wheel.  They know they shouldn’t,  because there is so much really useful, complete and tested open source code available, but it always turns into a tedious hassle integrating other people’s code with your own.

I think the problem is that everyone arranges the files required to build a program executable in their own peculiar way.  This is called configuration management and it is not hard, which is why programmers prefer not to think about it, but it has to be done perfectly or you end up with all those mysterious undefined symbols and missing links that can take hours to track down.

There is no right way to do configuration management, since almost any arrangement can be made to work.  Here is how I like to arrange things, which has the one advantage that the raven::set toolset will integrate ‘out of the box’.

I work on Windows using the Microsoft Visual Studio C++ integrated development environment.

I create a folder to contain everything in a solution.  A solution is one or more executable program, the files required to build them, and the documentation.

Under the solution folder I create a folder called ‘src’ which contains all my source code that is shared by the programs in the solution and the source code from other open source projects that I use.

Under the ‘src’ folder I create a folder called ‘ravenset’.  This contains the raven::set source code files.

I create a folder under the solution folder for each project, containing everything required to build one executable.

For each project in the solution I add the following lines, as required, to the file stdafx.h

#include “ravenset/cutest.h”

#include “ravenset/cRunWatch.h”

For each project in the solution I add ‘../src’ to Project | Properties | C++ | Additional Include Directories.

If you do this, raven::set will now be integrated, and available in any code wherever you want to use the tool set.

However, you will also need the boost libraries.  I use these libraries in almost every solution I create, so they are installed in their own common location pointed to by the environment variable BOOSTROOT.  Using this arrangement, you will have to add $(BOOSTROOT) to Project | Properties | C++ | Additional Include Directories and $(BOOSTROOT)/lib to Project | Properties | Linker | Additional Library Directories

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s