Closed agrayver closed 9 years ago
A well known annoyance by gflags indeed! And a good opportunity to tackle it once and for all.
There's no good ways of fixing this, but a 'hack' used by others as well (http://caffe.berkeleyvision.org/doxygen/common_8hpp_source.html).
The code is now ready for gflags 2.1 but it is recommended to use the following in external programs that use gflags:
#include <gflags/gflags.h>
#ifndef GFLAGS_GFLAGS_H_
namespace gflags = google;
#endif // GFLAGS_GFLAGS_H_
gflags::ParseCommandLineFlags(&argc, &argv, true);
This is active on 'dev' branch.
gflags 2.1.1 does not seem to have namespace "google" anymore, instead it was renamed to "gflags". Simply replacing former with latter in all test/example files solved the problem.