undefined reference to 'absl::internal_statusor::Helper::Crash(absl::Status const&)' when using statusor #1492
-
Hi everyone, I'm getting the following compile errors
..-in my code, I'm only including this: #include <absl/status/statusor.h> ...and this is the only way in which I'm using abs: absl::StatusOr<CommandLineOptions> getCommandLineOptions(int argc, char** argv) {
std::vector<std::string> args = commandLineArgumentsToVector(argc, argv);
if (args.size() < 3) {
return absl::InvalidArgumentError("");
}
CommandLineOptions ret;
ret.input_path = args[1];
ret.output_path = args[2];
return ret;
} I'm using bazel to compile, this is my rule cc_binary(
name = "chunks_collisions",
srcs = ["main.cc"],
deps = [
":tileson",
":chunks_collisions_lib",
":gzip_decompressor_for_tileson",
"@com_google_absl//absl/status"
]
) Right now I'm using an older release( load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository')
http_archive(
name = "bazel_skylib",
sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz",
],
)
http_archive(
name = "com_github_google_benchmark",
urls = ["https://github.com/google/benchmark/archive/bf585a2789e30585b4e3ce6baf11ef2750b54677.zip"],
strip_prefix = "benchmark-bf585a2789e30585b4e3ce6baf11ef2750b54677",
sha256 = "2a778d821997df7d8646c9c59b8edb9a573a6e04c534c01892a40aa524a7b68c",
)
http_archive(
name = "com_google_absl",
urls = ["https://github.com/abseil/abseil-cpp/archive/a69b0ae5cdba53a45617afc408618a3e1ac244de.zip"],
strip_prefix = "abseil-cpp-a69b0ae5cdba53a45617afc408618a3e1ac244de",
)
#git_repository(
#name = "com_google_absl",
#remote = "https://github.com/abseil/abseil-cpp.git",
#commit = "c2435f8342c2d0ed8101cb43adfd605fdc52dca2",
#)
http_archive(
name = "com_google_googletest",
urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"],
strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015",
) ...and my current
I also tried by using c++20, with the same result. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
abseil-cpp/absl/status/BUILD.bazel Line 72 in d74b110
|
Beta Was this translation helpful? Give feedback.
abseil-cpp/absl/status/BUILD.bazel
Line 72 in d74b110
absl::StatusOr
is part of the@com_google_absl//absl/status:statusor
target. Your build rule has a dependency on@com_google_absl//absl/status
. To fix, add@com_google_absl//absl/status:statusor
todeps
.