# fsmsg **Repository Path**: hong_master/fsmsg ## Basic Information - **Project Name**: fsmsg - **Description**: 基于protobuf-c实现文件系统通信语义 - **Primary Language**: C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-17 - **Last Updated**: 2021-06-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README --- # build *【说明】编译工程采用cmake编译 * for linux (ubuntu) * apt-get install cmake 1. cd code root; 2. mkdir build 3. cd build 4. cmake ../ (default:debug mode) 5. make -j 6. make install --- # file 说明 * open_src (开源代码 protobuf-c) * src (message 源码) * inc (message 对外 函数头) #说明 cmake 执行后自动生成多外的头文件,具体解析时由py脚本实现,需要编译环境支持python3 生成库文件libmsg.so # protobuf 说明 只需要增加*.proto文件,由cmake自动生成对外有文件和库文件。inc目录里都是外部需要用到的头文件 ## protobuf-c ## Overview This is `protobuf-c`, a C implementation of the [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) data serialization format. It includes `libprotobuf-c`, a pure C library that implements protobuf encoding and decoding, and `protoc-c`, a code generator that converts Protocol Buffer `.proto` files to C descriptor code, based on the original `protoc`. `protobuf-c` formerly included an RPC implementation; that code has been split out into the [protobuf-c-rpc](https://github.com/protobuf-c/protobuf-c-rpc) project. `protobuf-c` was originally written by Dave Benson and maintained by him through version 0.15 but is now being maintained by a new team. Thanks, Dave! ## OS ubuntu: apt-get install automake autoconf libtool ## Source git clone --depth=1 https://github.com/protobuf-c/protobuf-c.git ## Mailing list `protobuf-c`'s mailing list is hosted on a [Google Groups forum](https://groups.google.com/forum/#!forum/protobuf-c). Subscribe by sending an email to [protobuf-c+subscribe@googlegroups.com](mailto:protobuf-c+subscribe@googlegroups.com). ## Building `protobuf-c` requires a C compiler, a C++ compiler, [protobuf](https://github.com/google/protobuf), and `pkg-config` to be installed. ./configure && make && make install If building from a git checkout, the `autotools` (`autoconf`, `automake`, `libtool`) must also be installed, and the build system must be generated by running the `autogen.sh` script. ./autogen.sh && ./configure && make && make install ## Documentation See the [online Doxygen documentation here](http://lib.protobuf-c.io) or [the Wiki](https://github.com/protobuf-c/protobuf-c/wiki) for a detailed reference. The Doxygen documentation can be built from the source tree by running: make html ## Synopsis Use the `protoc` command to generate `.pb-c.c` and `.pb-c.h` output files from your `.proto` input file. The `--c_out` options instructs `protoc` to use the protobuf-c plugin. protoc --c_out=. example.proto Include the `.pb-c.h` file from your C source code. #include "example.pb-c.h"