748 B
748 B
Run follow command by sequence:
To build protobuf from source, the following tools are needed:
On Ubuntu, you can install them with: $ sudo apt-get install autoconf automake libtool curl make g++ unzip
On Mac, you can install them with: $ brew install autoconf automake libtool
Then run the cmd. $ ./autogen.sh $ ./configure $ make $ make check $ sudo make install $ sudo ldconfig # refresh shared library cache.
Javascript 生成方法
- 安装nodejs
- 安装protobufjs
sudo npm install protobufjs@5 -g
- 生成JS
pbjs -t static-module -w commonjs -o protocol.js wfcmessage.proto