The gflags package contains a library that implements commandline flags processing. It includes built-in support for C++ types like string and the ability to define flags in the source file in which they're used. Please report any issues with this library at https://code.google.com/p/gflags/issues/list.