cmake -S ./ -B ./build -D CMAKE_CXX_STANDARD=17 -D protobuf_ABSL_PROVIDER=module 我这里使用了C++17的标准,推荐使用C++14及以上。protobuf_ABSL_PROVIDER这个选项有两个值:package和module,分别对应上述两种依赖库安装方法,这里只能写module。package需要另外一种编译方法。 成功生成vs的解决方案 编译项目...
gRPC_PROTOBUF_PROVIDER:STRING=module gRPC_RE2_PROVIDER:STRING=module gRPC_SSL_PROVIDER:STRING=module gRPC_USE_PROTO_LITE:BOOL=OFF gRPC_ZLIB_PROVIDER:STRING=module protobuf_ABSL_PROVIDER:STRING=module protobuf_ALLOW_CCACHE:BOOL=OFF protobuf_BUILD_CONFORMANCE:BOOL=OFF protobuf_BUILD_EXAMPLES:BOOL=OFF...
Starting from 22.x, protobuf now depends on absl and utf8_range, but the protobuf.pc pkgconfig file doesn't properly declare those dependencies. As a result, the build is broken if someone installs protobuf and then wants to include it via pkgconfig (since they'd be missing absl and ...
PS C:\code_dependencies\protobuf-28.0\cmake_build> cmake -S .. -B . `>> -DABSL_PROPAGATE_CXX_STD=ON `>> -DCMAKE_INSTALL_PREFIX="C:\code_dependencies\protobuf"`>> -Dprotobuf_BUILD_EXAMPLES=ON `>> -Dprotobuf_BUILD_LIBPROTOC=ON `>> -Dprotobuf_BUILD_LIBUPB=OFF `>> -Dproto...
另一个问题是现在的 protobuf 已经支持了 cmake 的config模式的导出库。然后install完以后,会有一个 protobuf-module.cmake 文件用于兼容老的模式提供的函数和变量,可以通过 find_package(Protobuf) 设置set(protobuf_MODULE_COMPATIBLE TRUE) 选项来开启。在交叉编译时,我们其实是不需要编译 protoc 的,但是这个模块...
因此,找到absl-config.cmake(例如,浏览或最坏情况下使用find / -name absl-config.cmake),并通过...
Temporary fix for b/283987730 (failing build due to new protobuf having absl dependencies). There is currently an issue with linking of Protobuf version 22.0 and newer. This is caused by an added dependency to Abseil, and the transitive dependencies that are not propagated correctly. ...
window下连接protobuf问题,find_package是正常的,但是连接时就会出现大量的符号未定义。 版本信息 protobuf: v24.3 cmake: 3.24.2 gcc.exe (x86_64-posix-seh-rev3, Built by MinGW-W64 project) 11.2.0 修改前的cmake文件如下 # ...find_package(protobufREQUIRED)# ...target_link_libraries(test_pb_li...
$<TARGET_SONAME_FILE:absl::vlog_config_internal> ${JAVA_RESSOURCES_PATH}/${JAVA_NATIVE_PROJECT}/ COMMAND ${CMAKE_COMMAND} -E $<IF:$<BOOL:${BUILD_Protobuf}>,copy,true> $<TARGET_SONAME_FILE:protobuf::libprotobuf> $<IF:$<BOOL:${BUILD_re2}>,copy,true> $<$<BOOL:${BUILD_re2}>...
#include "absl/status/statusor.h" @@ -22,6 +21,33 @@ namespace protobuf { namespace compiler { namespace rust {// We would love to use //file/base here, but that creates a dependency cycle, // since //file/base transitively depends on protoc. ...