Open shixiong-jiang opened 1 week ago
I found out the problem is the
includes = [
"src",
"src/cbor",
"src/cbor/internal",
],
in the https://github.com/PJK/libcbor/blob/master/examples/bazel/third_party/libcbor.BUILD
There is a strings.h file under the src/cbor/strings.h
too. It overwrites the c++'s default strings.h
includes = [
"src",
],
This fix the bug.
Describe the bug
https://github.com/PJK/libcbor/blob/master/examples/bazel/WORKSPACE compiled, However it failed to compile after replacing
new_local_repository
byhttp_archive
.To Reproduce
In https://github.com/PJK/libcbor/blob/master/examples/bazel/WORKSPACE, I replaced
new_local_repository
by
http_archive
. (As a user, we need to usehttp_archive
in thebazel
)where,
libcbor.BUILD
is as same as https://github.com/PJK/libcbor/blob/master/examples/bazel/third_party/libcbor.BUILD (I only updated the deps path + some typos in the srcs and hdrs)Then
bazel build :hello
workbazel build :tests
failExpected behavior
bazel build: test
succeed. Could you plz provide an bazel example withhttp_archive
?Thank you so much.
Environment libcbor version and build configuration flags (or source package version if using a package manager).