jart / hiptext

Turn images into text better than caca/aalib
Apache License 2.0
763 stars 44 forks source link

google namespace vs. gflags namespace #34

Open yurivict opened 8 years ago

yurivict commented 8 years ago

On FreeBSD I had to apply this patch:

--- hiptext.cc.orig     2016-06-17 23:50:21 UTC
+++ hiptext.cc
@@ -197,9 +197,9 @@ inline string GetExtension(const string&
 int main(int argc, char** argv) {
   // if (!isatty(1))
   //   FLAGS_color = false;
-  google::SetUsageMessage("hiptext [FLAGS]");
-  google::SetVersionString("0.1");
-  google::ParseCommandLineFlags(&argc, &argv, true);
+  gflags::SetUsageMessage("hiptext [FLAGS]");
+  gflags::SetVersionString("0.1");
+  gflags::ParseCommandLineFlags(&argc, &argv, true);
   google::InitGoogleLogging(argv[0]);
   google::InstallFailureSignalHandler();
   const char* lang = std::getenv("LANG");

I have gflags-2.1.2, glog-0.3.4 - the latest versions.

jart commented 8 years ago

Good to know. Thank you.

yurivict commented 6 years ago

Still:

src/hiptext.cc:200:3: error: no member named 'SetUsageMessage' in namespace 'google'; did you mean 'gflags::SetUsageMessage'?
  google::SetUsageMessage("hiptext [FLAGS]");
  ^~~~~~~~~~~~~~~~~~~~~~~
  gflags::SetUsageMessage