Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
c5fb586f
Unverified
Commit
c5fb586f
authored
Jul 05, 2019
by
John D. Pope
Committed by
GitHub
Jul 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow copy and paste from readme
spare people the time deleting $ from text.
parent
55ed1d42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
README.md
src/README.md
+22
-17
No files found.
src/README.md
View file @
c5fb586f
...
@@ -40,20 +40,22 @@ You can also get the source by "git clone" our git repository. Make sure you
...
@@ -40,20 +40,22 @@ You can also get the source by "git clone" our git repository. Make sure you
have also cloned the submodules and generated the configure script (skip this
have also cloned the submodules and generated the configure script (skip this
if you are using a release .tar.gz or .zip package):
if you are using a release .tar.gz or .zip package):
$ git clone https://github.com/protocolbuffers/protobuf.git
```
shell
$ cd protobuf
git clone https://github.com/protocolbuffers/protobuf.git
$ git submodule update --init --recursive
cd
protobuf
$ ./autogen.sh
git submodule update
--init
--recursive
./autogen.sh
```
To build and install the C++ Protocol Buffer runtime and the Protocol
To build and install the C++ Protocol Buffer runtime and the Protocol
Buffer compiler (protoc) execute the following:
Buffer compiler (protoc) execute the following:
$ ./configure
```
shell
$ make
./configure
$ make check
make
$ sudo make install
make check
$ sudo ldconfig # refresh shared library cache.
sudo
make
install
sudo
ldconfig
# refresh shared library cache.
```
If "make check" fails, you can still install, but it is likely that
If "make check" fails, you can still install, but it is likely that
some features of this library will not work correctly on your system.
some features of this library will not work correctly on your system.
Proceed at your own risk.
Proceed at your own risk.
...
@@ -83,10 +85,12 @@ Protocol Buffers integrates with pkg-config to manage this. If you
...
@@ -83,10 +85,12 @@ Protocol Buffers integrates with pkg-config to manage this. If you
have pkg-config installed, then you can invoke it to get a list of
have pkg-config installed, then you can invoke it to get a list of
flags like so:
flags like so:
pkg-config --cflags protobuf # print compiler flags
pkg-config --cflags protobuf # print compiler flags
pkg-config --libs protobuf # print linker flags
pkg-config --libs protobuf # print linker flags
pkg-config --cflags --libs protobuf # print both
pkg-config --cflags --libs protobuf # print both
For example:
For example:
c++ my_program.cc my_proto.pb.cc `pkg-config --cflags --libs protobuf`
c++ my_program.cc my_proto.pb.cc `pkg-config --cflags --libs protobuf`
...
@@ -97,6 +101,7 @@ not pass the correct set of flags to correctly link against
...
@@ -97,6 +101,7 @@ not pass the correct set of flags to correctly link against
libprotobuf. If the package in question uses autoconf, you can
libprotobuf. If the package in question uses autoconf, you can
often fix the problem by invoking its configure script like:
often fix the problem by invoking its configure script like:
configure CXXFLAGS="$(pkg-config --cflags protobuf)" \
configure CXXFLAGS="$(pkg-config --cflags protobuf)" \
LIBS="$(pkg-config --libs protobuf)"
LIBS="$(pkg-config --libs protobuf)"
...
@@ -118,15 +123,15 @@ of "protobuf" in these examples.
...
@@ -118,15 +123,15 @@ of "protobuf" in these examples.
For a Mac system, Unix tools are not available by default. You will first need
For a Mac system, Unix tools are not available by default. You will first need
to install Xcode from the Mac AppStore and then run the following command from
to install Xcode from the Mac AppStore and then run the following command from
a terminal:
a terminal:
```
shell
$
sudo xcode-select --install
sudo
xcode-select
--install
```
shell
To install Unix tools, you can install "port" following the instructions at
To install Unix tools, you can install "port" following the instructions at
https://www.macports.org . This will reside in /opt/local/bin/port for most
https://www.macports.org . This will reside in /opt/local/bin/port for most
Mac installations.
Mac installations.
```
shell
$
sudo /opt/local/bin/port install autoconf automake libtool
sudo
/opt/local/bin/port
install
autoconf automake libtool
```
Then follow the Unix instructions above.
Then follow the Unix instructions above.
**Note for cross-compiling**
**Note for cross-compiling**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment