我在工作区中使用 Bazel 将 glog 导入为:
git_repository(
name = "com_github_glog_glog",
commit = "3106945d8d3322e5cbd5658d482c9ffed2d892c0",
remote = "https://github.com/google/glog.git",
)
bind(
name = "glog",
actual = "@com_github_glog_glog//:glog",
)
当直接构建 glog(bazel build external:glog)时,它工作正常,但是,当我尝试将它用作我的一个构建目标中的依赖项时,我收到以下错误:
bazel-out/darwin-fastbuild/bin/external/com_github_glog_glog/_virtual_includes/glog/glog/stl_logging.h:50:6: error: invalid token at start of a preprocessor expression
#if !@ac_cv_cxx_using_operator@
^
我在 macOS 10.13.2 上。
关于如何解决这个问题的任何想法?macOS上的编译器有问题吗?