bazel - 为什么 bazel 没有从外部拾取我的标题?
问题描述
我做的时候有问题bazel build //MyPackage:MyTarget
fatal error: tls.h: No such file or directory
#include <tls.h>
我尝试了一切:
#include <external/libressl/install/include/tls.h>
#include <libressl/install/include/tls.h>
#include <include/tls.h>
#include <tls.h>
Bazel 查询告诉我存在依赖项,所以应该没问题:
bazel query 'labels(hdrs, //MyPackage:MyTarget)'
@libressl//install:hdrs
标题本身也肯定会被选中:
bazel query 'labels(hdrs, @libressl//install:hdrs)'
@libressl//install:include/tls.h
这是目标:
cc_library(
name = "MyTarget",
hdrs = [
"@libressl//install:hdrs"
],
srcs = [
"test.cpp",
],
deps = [
"@libressl//install:libssl",
"@libressl//install:libtls",
"@libressl//install:libcrypto"
],
copts = [
"-Iexternal/libressl/install/include"],
)
那么可能是什么问题呢?我可以清楚地看到我的外部文件夹并且路径是正确的,我复制粘贴它。完整路径:my-workspace/bazel-my-workspace-isolated/external/libressl/install/include/tls.h
解决方案
我不得不"@libressl//install:hdrs"
把deps
推荐阅读
- c - 链表的这个空闲列表递归函数是做什么的?
- css - Flexbox 网格:如何并排显示 3 个项目,但垂直位置不同
- javascript - 重写jQuery函数来处理同一页面上的两个多级下拉菜单
- javascript - 使用 css 和 javascript 旋转立方体时保持固定轴
- c++ - 如何使用 PathCreateFromUrlA API
- python - 为什么这个 python 字符序列码给出了意想不到的结果?
- python - 使用 Clock.schedule_interval 每秒更新一个显示的变量
- javascript - 我的图像设置为绝对位置,但是当它离开屏幕时,没有出现滚动条
- chainer - cupy.cuda.runtime.CUDARuntimeError:cudaErrorInsufficientDriver
- cuda - 有没有办法在奇数大小的数据数组上使用 CUB::BlockScan?