Skip to content

在CMakeLists.txt中设置ENABLE_LOGGING=OFF时编译失败 #211

@f32y

Description

@f32y
brew install cmake git boost
make -f Makefile.xcode thirdparty
make -f Makefile.xcode

错误:

/Users/nil/Park/squirrel/librime/src/rime/config/config_compiler.cc:54:58: error: use of overloaded operator '<<' is
      ambiguous (with operand types 'rime::VoidLogger' and 'rime::Reference')
  DLOG(INFO) << "IncludeReference::Resolve(reference = " << reference << ")";
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~
In file included from /Users/nil/Park/squirrel/librime/src/rime/config/config_compiler.cc:2:
In file included from /Users/nil/Park/squirrel/librime/src/rime/common.h:32:
/Users/nil/Park/squirrel/librime/src/rime/no_logging.h:14:15: note: candidate function [with T = rime::Reference]
  VoidLogger& operator<< (const T& x) { return *this; }
              ^
In file included from /Users/nil/Park/squirrel/librime/src/rime/config/config_compiler.cc:4:
/Users/nil/Park/squirrel/librime/src/rime/config/config_compiler.h:39:10: note: candidate function
      [with StreamT = rime::VoidLogger]
StreamT& operator<< (StreamT& stream, const Reference& reference) {
         ^
/Users/nil/Park/squirrel/librime/src/rime/config/config_compiler.cc:63:44: error: use of overloaded operator '<<' is
      ambiguous (with operand types 'rime::VoidLogger' and 'rime::Reference')
    LOG(ERROR) << "failed to merge tree: " << reference;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions