From 7e255127b6ed81076ad52a98e002a2da2e113023 Mon Sep 17 00:00:00 2001 From: liaogang Date: Thu, 22 Dec 2016 15:24:05 +0800 Subject: [PATCH] Fix gflags 2.1 issue --- paddle/utils/Util.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paddle/utils/Util.cpp b/paddle/utils/Util.cpp index 53e26d7b3..0f778dbeb 100644 --- a/paddle/utils/Util.cpp +++ b/paddle/utils/Util.cpp @@ -152,6 +152,11 @@ void initMain(int argc, char** argv) { line += ' '; } LOG(INFO) << "commandline: " << line; + +#ifndef GFLAGS_GFLAGS_H_ + namespace gflags = google; +#endif + gflags::ParseCommandLineFlags(&argc, &argv, true); CHECK_EQ(argc, 1) << "Unknown commandline argument: " << argv[1]; -- GitLab