bazelbuild/bazel

Documentation issue: Common C Build Use Cases

Open

#13.508 geöffnet am 22. Mai 2021

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (4.465 Forks)batch import
P3help wantedteam-Documentationteam-Rules-CPPtype: documentation (cleanup)

Repository-Metriken

Stars
 (25.384 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 22T 20h) (77 gemergte PRs in 30 T)

Beschreibung

Documentation URL: https://docs.bazel.build/versions/4.1.0/cpp-use-cases.html

The sections Including external libraries and Writing and running C++ tests are untestable in the current state.

  1. The ./test/hello-test.cc file includes #include "lib/hello-greet.h", but nowhere was hello-greet mentioned. I guessed it was referring to the structure in stage3 of the previous tutorial, but hello-greet.h in that tutorial is in main/ and not /lib.

I ended up creating a directory structure like

image

which managed to work, but it would be nice to add this to the github cpp-tutorial, maybe as a 4th stage.

  1. The other problem is that the first WORKSPACE + gtest.BUILD (without the strip_prefix) in https://docs.bazel.build/versions/4.1.0/cpp-use-cases.html#including-external-libraries didn't compile for me. I get the error:

image

Contributor Guide