有没有可能不使用pthread来构建protobuf ?
Is it possible to build protobuf without pthread?
需要在没有pthread的实时操作系统上使用协议缓冲区。我可以通过这种方式静态地链接protobuf
g++ -g -Wall example.pb.cc example.cc -o example -static -lprotobuf -lpthread
然而,没有pthread我得到链接错误。是否可以配置protobuf在没有pthread的情况下工作?
不完全是。查看此未解决的问题。
有人已经修补了一个旧的protobuf版本,不再依赖于pthreads,见这里-如果你真的需要它,你可以看看,可能转发端口。
还请注意,当使用protobuf时,您应该使用pkg_config来获得正确的编译器和链接器标志,例如
pkg-config --cflags protobuf # compiler flags
pkg-config --libs protobuf # linker flags
相关文章:
- C++为构建时间获取QDateTime的可靠方法
- 无法在 CLion 中构建 C++ 项目
- 函数向量_指针有不同的原型,我可以构建一个吗
- 如何使用ndk-build.cmd构建Android.so文件
- libssh 的函数在构建 libssh 时无法在 Qt 和 cmake 错误中找到
- 使用cmake从源代码构建MySQL连接器/C++失败(与以前的声明冲突)
- VSCode-有一个红色下划线,但程序构建和运行正确,并且出现配音错误
- 构建可组合有向图(扫描仪生成器的汤普森构造算法)
- 无法使用Qt Creator在Windows中构建yaml-cpp
- 带有Protobuf序列化的C++Hazelcast:字符串不是UTF-8格式的
- 防止 GNU Make 在每次构建时生成 protobuf 代码
- Google的protobuf版本是用-std=c++98或-std=c++03构建的?
- 使用VS2017构建用于Linux的Protobuf
- 使用Protobuf构建CMAKE项目
- Google Protobuf 3:使用 CMAKE 构建时未定义的引用错误
- 如何从一组已定义的描述符动态构建新的 protobuf
- 如何使用MinGW在Windows中构建Google的protobuf?
- 如何在不使用iostreams的情况下构建Google protobuf
- 无法使用谷歌的protobuf构建测试C++应用程序
- 有没有可能不使用pthread来构建protobuf ?