首页 > 解决方案 > 使用 Bazel 和 Mingw 编译 gflags 库

问题描述

我在 Windows 10 上使用 MSYS2。我将mingw-w64-x86_64-gcc安装到我的 MSYS2 环境中。

现在我尝试gflags使用 Bazel 和 MinGW 构建库。

git clone https://github.com/gflags/gflags.git
cd gflags
bazel build --compiler=mingw-gcc //...

我收到以下错误:

ERROR: G:/dev/gflags/BUILD:16:30: Action gflags_declare.h failed: (Exit -1073741515): expand_template.exe failed: error executing command bazel-out/host/bin/bazel/expanded_template/expand_template.exe --template src/gflags_declare.h.in --output bazel-out/x64_windows-fastbuild/bin/gflags_declare.h @GFLAGS_NAMESPACE@;gflags ... (remaining 2 argument(s) skipped

执行时似乎出了点问题expand_template。但我不知道为什么。有没有人有一些想法或提示这里有什么问题?

标签: mingwbazelmsys2gflagsbazel-cpp

解决方案


推荐阅读