Open GoogleCodeExporter opened 8 years ago
How to solve this problem?
Original comment by linyu...@gmail.com
on 7 May 2014 at 12:04
This is my patch for src directory:
diff -r glog-0.3.3/src/demangle_unittest.cc
glog-0.3.3-new/src/demangle_unittest.cc
48a49,51
> #ifdef HAVE_LIB_GFLAGS
> using namespace gflags;
> #endif
diff -r glog-0.3.3/src/logging_unittest.cc
glog-0.3.3-new/src/logging_unittest.cc
81a82,84
> #ifdef HAVE_LIB_GFLAGS
> using namespace gflags;
> #endif
diff -r glog-0.3.3/src/signalhandler_unittest.cc
glog-0.3.3-new/src/signalhandler_unittest.cc
44a45,47
> #ifdef HAVE_LIB_GFLAGS
> using namespace gflags;
> #endif
diff -r glog-0.3.3/src/symbolize_unittest.cc
glog-0.3.3-new/src/symbolize_unittest.cc
45a46,48
> #ifdef HAVE_LIB_GFLAGS
> using namespace gflags;
> #endif
diff -r glog-0.3.3/src/utilities_unittest.cc
glog-0.3.3-new/src/utilities_unittest.cc
36a37,39
> #ifdef HAVE_LIB_GFLAGS
> using namespace gflags;
> #endif
Original comment by senindmi...@gmail.com
on 7 May 2014 at 3:03
Add using instruction:
#ifdef HAVE_LIB_GFLAGS
using namespace gflags;
#endif
in each unittest in the same place, where you declare other namespaces
(GOOGLE_NAMESPACE and so on)
Original comment by senindmi...@gmail.com
on 7 May 2014 at 3:07
The patch is attached. Could you please apply it to the repository?
Original comment by carles.f...@gmail.com
on 18 May 2014 at 2:12
Attachments:
You forgot to correct src/signalhandler_unittest.cc.
I attach new patch file. This one works good on r142.
Original comment by senindmi...@gmail.com
on 19 May 2014 at 6:13
Attachments:
I got same error. Why this error happens especially in this environment?
Original comment by limh...@gmail.com
on 9 Jun 2014 at 1:55
Because using gflags functions and structures are declared in gflags namespace,
but in unittests they are used without corresponding access specifier and
"using namespace gflags" instruction. For example, line 179 in
logging_unittest.cc:
ParseCommandLineFlags(&argc, &argv, true);
Original comment by senindmi...@gmail.com
on 9 Jun 2014 at 10:27
Excuse me, I still cannot compile even with the patch.
One of the multiple errors is this :
src/logging_unittest.cc:1041:1: error: ‘FlagSaver’ was not declared in this
scope
Original comment by alessio....@gmail.com
on 14 Oct 2014 at 4:52
Original issue reported on code.google.com by
senindmi...@gmail.com
on 7 May 2014 at 10:11