Category : abseil

I am trying to add firebase-cpp-sdk in my desktop app project which uses CMake. In my CMakeLists.txt I have this line: add_subdirectory("${PROJECT_SOURCE_DIR}/firebase-cpp-sdk") but when I run cmake I am getting error: CMake Error at firebase-cpp-sdk/external/src/firestore-build/external/src/abseil-cpp/CMake/AbseilHelpers.cmake:178 (message): Invalid build type: static Call Stack (most recent call first): firebase-cpp-sdk/external/src/firestore-build/external/src/abseil-cpp/absl/base/CMakeLists.txt:42 (absl_cc_library) Any suggestion what to try in order ..

Read more

I have the following reduced CMake code for using Abseil in a library: (minimal repository to reproduce) cmake_minimum_required(VERSION 3.20) project(MyProject) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") set(ABSL_PROPAGATE_CXX_STD ON) find_package(absl REQUIRED) add_library(MyStaticLibTarget STATIC MyStaticLib.cpp) target_link_libraries(MyStaticLibTarget absl::strings) install(TARGETS MyStaticLibTarget EXPORT MyProjectTargets) install(TARGETS strings EXPORT MyProjectTargets) if(EXPORT_MYSTATICLIB) export(TARGETS MyStaticLibTarget FILE lib/cmake/MyProject/MyProjectTargets.cmake) endif() # Setup for downstream clients of MyProject? install(EXPORT MyProjectTargets DESTINATION ..

Read more

Tried to install as per grpc quickstart page. Installation of gRPC itself was fine but third-party/abseil-cpp is giving lot of errors ("make -j" step): #error "C++ versions less than C++11 are not supported." /home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/config.h:108:15: error: static_assert expression is not an integral constant expression /home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/policy_checks.h:77:2: error: "C++ versions less than C++11 are not supported." #error "C++ ..

Read more

I am building a C++ project that uses gRPC. The layout of the source code is basically /protos foo.proto /includes *.h /src client.cpp server.cpp CMakeLists.txt To generate my cpp and gRPC files I’m using the protobuf_generate CMake function like find_package(Protobuf CONFIG REQUIRED) find_package(gRPC CONFIG REQUIRED) add_library(foo ${proto_files}) target_link_libraries(foo PUBLIC protobuf::libprotobuf gRPC::grpc++ ) then protobuf_generate( TARGET ..

Read more

I cannot build abseil-cpp with Bazel. I’m building it directly on arm64. Device: NVIDIA Jetson Xavier NX OS: Ubuntu 18.04 CPU: 6-core NVIDIA Carmel ARMĀ®v8.2 64-bit ./example/hello_world.cc #include <iostream> #include <string> #include <vector> #include "absl/strings/str_join.h" #include "absl/random/random.h" int main() { std::vector<std::string> v = {"foo", "bar", "baz"}; std::string s = absl::StrJoin(v, "-"); absl::BitGen bitgen; std::cout << ..

Read more

I tried to use abseil’s string library, but already the simple example does not run and fails with terminate called after throwing an instance of ‘std::bad_alloc’. The snippet I use #include "absl/strings/str_cat.h" #include "fmt/core.h" int main(){ auto s1 = absl::StrCat("A string ", " another string", "yet another string"); fmt::print( "{}n", s1); } I use Abseil ..

Read more